WordPress errors out quickly while I am investigating the code with Xdebug and VS Code. I have tried adding “Timeout 600” to the D:\Local Sites\sjvh\conf\apache\apache2.conf.hbs file but there is no change. I need to be able to investigate longer before the WP Application errors out/closes down.
What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc
Set a breakpoint in a file like wp-config.php on the line that reads “define( ‘DB_NAME’, ‘local’ );” and watch the screen when you open/run your WP application. Wait for 60 seconds and the application in the browser will pop up a message that like this one…
Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.
I did go through the performance guide, and while Local is considerably slower than something like XAMPP (although I am not sure why) this particular issue seems to be related to execution time for PHP since PHP is the only thing running at this point in bringing up a WordPress site. At this point, it hasn’t even gotten to the part where it draws anything onscreen yet - it is simply defining a name for the database in an included PHP file (wp-config.php).
Naturally you’d think that increasing the max_execution_time would help, but that is already set to 1200 seconds (20 minutes). I also tried adding “Timeout 600” (a 10 minute timeout) to .htaccess with no luck.
I have tried the following all with no success…
Add the following to wp-config.php:
set_time_limit(30000);
Add the following to .htaccess:
php_value max_execution_time 30000
Add the following to php.ini:
max_execution_time = 30000
It is on all sites. I created a new WP site using the Preferred settings and set the same breakpoint in wp-config.php (line 24 - define( ‘DB_NAME’, ‘local’ ) and it times out after about 35 seconds.
You mentioned Local being considerably slower than XAMPP. Outside of using Xdebug + VS Code are you having other performance speed issues in the app or when navigating sites? Even if they are new installs?
Are the sites all running Apache? Or do you have issues regardless of Apache or NGINX?
This site is running Apache because that is what the live site runs on Cloudways. The plain WP test site is using nginx that comes from Preferred in version Version 8.0.1+6490 of Local
The slowness issue is most prevalent on the site I am trying to manage. The new WP test sites are new so they don’t have any new posts or pages or a significant database - maybe that’s why they are faster.
I can upload an export of the site I am working on if that will help. It is an 809MB zip file. I need away to get you the login info without posting the file link and login info here.
I need to add a little code to stop it from adding duplicate API calls. I just need to see unique API calls because I am trying to replace those calls (they are calls to an intermediate API server) with direct calls to the main API server.