Funny WordPress Elementor Problem I Found in My Potato Laptop

Tags: WordPress, Elementor, Nginx, PHP

a screenshot showcasing wordpress elementor didnt work fatal error max execution time 30 second

Context or Problem

If you’re running WordPress with Elementor on a low-spec local machine (a “potato laptop”) and using Flyenv with PHP 8.4.7, MySQL 9.0, and Nginx 1.25, you might run into this fatal error when using the Elementor plugin:

Fatal error: Maximum execution time of 30 seconds exceeded in
C:\Users\Administrator\wp672\wp-includes\Requests\src\Transport\Curl.php on
line 510

This happens specifically after activating Elementor and using the “Hello Elementor” starter theme.


Experiment

  1. Use potato laptop
  2. I use Flyenv to run this
  3. Use PHP 8.4.7 latest
  4. Use MySQL 9.0 latest
  5. Use Nginx 1.25.5
  6. Install fresh WordPress either latest version or the latest one “compatible” with Elementor 6.7.2
  7. I use v6.7.2
  8. Fresh install works fine, change permalink to %postname%
  9. Everything works fine
  10. Install Elementor plugin
  11. It works
  12. Use starter theme “Hello Elementor”
  13. You will get this error
Fatal error: Maximum execution time of 30 seconds exceeded in
C:\Users\Administrator\wp672\wp-includes\Requests\src\Transport\Curl.php on
line 510
  1. My first approach was just using AI, I mean just increasing php.ini max_execution_time to 300 seconds because this is just development environment in potato laptop right? Who cares how long it takes.
  2. It kinda worked, now showing 504 Gateway Timeout Nginx 1.25.5
  3. So I assumed I also needed to increase the Nginx configuration
  4. Asked AI what I can do about it, and got this:
# Increase timeouts for local development
client_body_timeout 300s;
client_header_timeout 300s;
send_timeout 300s;
proxy_read_timeout 300s;
  1. Slapped that inside my Nginx vhost configuration to something like this:
server
{
listen 80;
listen 443 ssl;
server_name wp672.test wp672.test;
index index.php index.html index.htm default.php default.htm default.html;
root "C:/Users/Administrator/wp672";
client_body_timeout 300s;
client_header_timeout 300s;
send_timeout 300s;
proxy_read_timeout 300s;
42 collapsed lines
ssl_certificate "C:/Program Files/PhpWebStudy-Data/server/CA/1748849431656/CA-1748849431656.crt";
ssl_certificate_key "C:/Program Files/PhpWebStudy-Data/server/CA/1748849431656/CA-1748849431656.key";
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
#PHP-INFO-START
include enable-php-84.conf;
#PHP-INFO-END
#REWRITE-START URL rewrite rules
include "C:/Program Files/PhpWebStudy-Data/server/vhost/rewrite/wp672.test.conf";
#REWRITE-END
# Block access to sensitive files
location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
{
return 404;
}
# Allow SSL certificate verification directory
location ~ \.well-known{
allow all;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
error_log off;
access_log off;
}
location ~ .*\.(js|css)?$
{
expires 12h;
error_log off;
access_log off;
}
access_log "C:/Program Files/PhpWebStudy-Data/server/vhost/logs/wp672.test.log";
error_log "C:/Program Files/PhpWebStudy-Data/server/vhost/logs/wp672.test.error.log";
}
  1. Try to view my WordPress URL and now it works! Voila!
  2. Then I reverted back the max_execution_time php.ini config since the problem was from Nginx, not from PHP
  3. Re-tested and validated everything still works
  4. It works!
  5. Still paranoid, so I tried to add new page using Elementor builder UI
  6. It opened the UI, I created a basic page, published it and see.
  7. Alright, it works too!
  8. Intrusive thought: “What if I use the latest version of WordPress now? Like v6.8.1?”
  9. Let’s see
  10. Use similar nginx configuration, restart Nginx
  11. Install same plugin and themes
  12. Open the URL and see
  13. It didn’t work LOL
  14. Guess I need to re-add the max_execution_time = 300 again in php.ini and see
  15. Still didn’t work
  16. Weird, I tried to view and reloaded again and now it takes longer time, it gave me hope
  17. Then it worked!!
  18. Do step 23–24 again
  19. It works!

Outcome

a screenshot showcasing wordpress elementor finally working fine after change php.ini and nginx configuration to 300second


Possible Next Steps

References