How to replicate tee behavior in Python when using subprocess?

I'm looking for a Python solution that will allow me to save the output of a command in a file without hiding it from the console. FYI: I'm asking about tee (as the Unix command line utility) and...

DomPDF render of large HTML file results in 500 error

I'm using the most recent version of DomPDF (0.6.0 beta 3). PHP Version is 5.2.17. Unfortunately, I'm on a shared hosting account and upgrading PHP and similar actions are unavailable. I also...

automatic login to wordpress dashboard from another site

I want to log in automatically to WP admin/dashboard from another site without going thru the login process.. I've tried the following but with no...

WordPress wp_ajax_nopriv not working

wp_ajax works perfectly (i.e. when logged in). wp_ajax_nopriv is not working (when not logged in). I am using wp_localize_script to pass through the admin_url('admin-ajax.php') to the JS as shown...

Wordpress SSO with Chamilo LMS - log in to chamilo in background

im working to setup SSO from Wordpress(Site A) to Chamilo 1.9.6( Site B). I already did the script which try to log me to chamilo after succesful login to WP. Script code: based on chamilo...

WooCommerce shipping methods not working for logged-in users?

I have developed a custom build on woocommerce. All is fine except for the checkout page. The site ships to UK only, and i have Flat Rate shipping enabled. However, on the checkout page there are...

Is Nginx + php-fpm is suppose be much faster than Apache + mod-php

I'm having a PHP based web application running on Apache server which has considerable amount of php processing in back end. Since the overall performance is low I worked on improving the...

How to redirect non logged in users to Login page on Wordpress?

I know this is a question asked million times but I can't find an answer that is either fitting the version of Wordpress now and/or my particular case. I have a Wordpress website with Buddypress...

How to only show logged in user's posts to user?

I want to create a site where the user will only be able to see their own posts. Note: I am not talking about the admin section. I want to limit the posts that are displayed on the public facing...

Hide wp-login.php as log-in and redirect it to a custom login page

I'm trying to hide the wp-login.php on my site so I installed the plugin Rename wp-login.php, I renamed it as log-in. Now I want to redirect it to my custom login page so the default login form of...

Log only real fatal errors from PHP-FPM in Docker container

I'm using NGINX with PHP-FPM in seperated Docker containers. I want to get errors only to stderr, so that I can collect them on a centralized log-server. Problem is: I'm using WP and seems to have...

Page not found on localhost WordPress site

I am working on a WordPress website on localhost using Xampp. Today I changed the site URL and home URL in phpMyAdmin to a host; I plan on transferring my site too, but I ran into some issues so I...

JavaScript: Restrict dates on datepicker

I am putting together a WordPress site that does this: Allows clients to log in, and Schedule pickup and delivery of their laundry. Currently, I am using Ninja Forms to take my orders. Issue I...

You don't have permission to access /wp-admin/post.php on this server. Wordpress

The question was edited 3 times and it now includes VPS and Centos tags, because i think there is something wrong with my VPS config file. Ok, first, I've looked through all the questions asked...

Cannot connect to Wordpress docker container.on google cloud platform

Ok so I have read the other connecting to docker container questions and mine does not seem to fit any of the other ones. So here it goes. I have installed docker and docker compose. I built the...

gatsby-source-wordpress: localFile field null on images in ACF fields on netlify deploy

I'm using the gatsby wordpress plugin to retrieve my posts from my hosted WP site. Locally, gatsby build works fine and all my ACF fields are retrieved. However, on my Netlify deploy the property...

Wordpress get user info from same browser logged into site

I'm trying to use the Wordpress API wp_get_current_user(), however it's always returning the 0 user, with empty data. I am on a fresh install of Wordpress and I have just created my own theme and...

Wordpress JSON API only working when logged in

I seem to be only able to access the wordpress json api when I am logged in in wordpress (no matter which endpoint, even on GET mypage.com/wp-json/). When I remove all cookies or logout and call...

wordpress+docker+apache mod proxy redirects to http://localhost

My environment is, a docker container running wordpress on apache can be accessed via ip:port . The host environment has an apache instance which redirects traffic that comes to http://myurl to...

Amazon Affiliate Banner only visible for logged in users like Admin

I am trying to display Amazon Banner on my blog post. But the Banner is only visible to the logged in users likes Admin. When I am trying to check the same from other PC or browser it's not...

Varnish (?) interrupting file download

On a debian buster server I have an apache2 web server with varnish as a cache in front of it, actually varnish listens on port 80 and fetches from apache which listens on port 8080. Maybe since...

How do you log out of WordPress using a REST interface?

Use case: I am implementing a SSO solution for a WordPress site where the user is first authenticated on site A (non-WordPress). On successful authentication, the user is auto-loggedin to WP site...

toggle class in wordpress

Hello i am working on a wordpress site and trying to stop the below css animation on click (if a second click happens do nothing) in 2 elements on the menu of the site. My HTML in the menu...

I'm getting a 403 (Forbidden) error when I use AJAX on my local

I'm getting a 403 error on a WordPress page when I send an AJAX call. I'm using WP on my local (MAMP). I have a script that sends an ajax call to the WP database. Triggering the call produces the...

Wordpress nav walker - adding SVG arrow icon to parent menu item

This is my code for displaying dropdowns in nav menu. I've found it somewhere in internet and edited. I need to display SVG icon element in parent <li> if has submenu / dropdown menu. <?php if (...

How to display menu alignmet from left to right in WordPress?

I am new to WordPress theme development and have an issue with alignment of menu items. It appears from top to bottom, and I want to change the items from left to right, and to add some features...

Uncaught type error after Wordpress update to 5.5.3 and visual composer to 6.4.1

I got some uncaught error after updating WP to 5.5.3 version and visual coomposer to 6.4.1. Visual composer page builder stopped working, it only shows shortcode in the backend. Luckily nothing...

GraphQL not making request to WP API

Thanks in advance! I'm pulling data from a WP Rest API and when spin up the wordpress site on my local machine with the address http://localhost:8000 and got to the graphqli playground on...

Windows Authentication for IdentityServer doesn't take login without error message

I have configured my identityServer to use Windows authentication. My problem is that the Windows Security login box in my browser keeps coming back after submit my Windows login. It looks like...

Cant SSH to my Google Cloud VM instance anymore

Hoping someone can help me with this. The title says it all, I cant SSH to my VM instance. What I am seeing: 1 . If I try to SSH normally, the process just loops endlessly (I actually think the...