0

I'm trying to set up an AWS LAMP environment for WordPress. Everything on the AWS side is working. EC2, S3, EFS, RDS, Cloudflare, the whole package. The site loads and is blazingly fast... however both WP Core, theme, and plugin updates fail silently. No error messages printed to the screen, nothing helpful printed to console, nothing tracked in error logs.

If I try to update plugins/themes in very small batches, like 1 at a time, the process sometimes works. Most of the time it just hangs for about a minute and then stops. Anything too big always fails.

Core updates always fail. It gets to "Unpacking the update…" and stops there. All in all it will try for maybe 60 seconds before the page simply stops loading despite max_execution_time being set to 300.

  1. I've increased every php value I can think of that may help:

    • max_execution_time = 300
    • memory_limit = 1G
    • post_max_size = 25M
    • max_input_vars = 1000
  2. I've checked, rechecked, and loosened permissions to webroot. Everything is good on this front.

  3. I've run the WP Health Check and everything comes up hunky dory. No problems reported here other than a nag to move from PHP 7.0 to 7.2.

  4. I've done a fresh install, DB and files, multiple times.

  5. I've tried multiple versions of WP to rule out a 5.* issue.

  6. I'm running 2019 theme with only basic plugins for testing.

  7. Debugging is enabled, but again, nothing prints to the log.

I'm not new to WP but am new to AWS and I'm stuck and looking for ideas. What could I be missing? Something obscure on the AWS side that's preventing WP from communicating or executing long running scripts?

Many thanks in advance.

  • What user is set as the "owner" of the WordPress folders and files? When I set up my site on AWS using the bitnami package, the permissions were much more restrictive than I was used to, and at one point I had modified them which prevented updates. – tmdesigned Apr 27 at 11:25
  • Thank you @tmdesigned! The owner of all folders and files in webroot is apache, with permissions on directories set to 755 and files set to 644. I even loosened directories to 775 at one point still with no luck. – badcrocodile Apr 27 at 16:49
0

Check your file permissions, you can run the following command in the root folder.

chown www-data:www-data  -R *
find . -type f -exec chmod 644 {} \; 
find . -type d -exec chmod 755 {} \; 

To troubleshoot WordPress errors, you require to enable WordPress Debug, which can be done using wp-config.php. You need to copy and paste the code in the wp-config.php file shown below. define( 'WP_DEBUG', true ); .

  • Directories are set to 755, files to 644. Even tried 775 at one point for directories with no luck. Debugging is enabled and set to output to screen and write to log via wp-config but unfortunately nothing is being output or logged. define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', true ); @ini_set( 'display_errors', 1 ); – badcrocodile Apr 27 at 16:52
  • Just try to provide FTP access in wp-config.php file. – Arvind Singh Apr 27 at 20:23
  • Also, try out this code in acpache config '<Directory /var/www/html> php_admin_flag safe_mode off </Directory>' – Arvind Singh Apr 27 at 20:24
  • Thank you again @arvind-singh. I'm running php 7.0, so unfortunately php_admin_flag_safe_mode doesn't exist for me. Also I'm running on an AWS stack that sits behind a bastion server so FTP and SFTP are not options for me. – badcrocodile Apr 27 at 20:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.