Skip to content

Wordpress install script gives 504 error on Lightsail LAMP stack

0

Hi, I'm trying to install Wordpress on a pre existing Lightsail instance running the Bitnami LAMP stack. When I run the install script, I get a 504 gateway timeout error. I tried to look for any error logs that could give me some info, but I couldn't find anything. I tried to increase the timeout, but couldn't figure out how to do that - it seems to be stuck at 30 seconds even though I increased it in php-fpm.conf and php.ini. I'm pretty new to all this, so sorry if there's an obvious solution that I'm missing. Thanks.

asked 2 years ago267 views

1 Answer
0

The 504 Gateway Timeout error you're experiencing during WordPress installation on your Lightsail LAMP stack instance could be caused by several factors. Here are some steps you can take to troubleshoot and potentially resolve the issue:

  1. Check and adjust PHP timeout settings:

    • Verify that you've correctly modified the max_execution_time in php.ini
    • You may need to restart the PHP service after making changes for them to take effect
  2. Apache timeout settings:

    • Check the Apache configuration files for timeout settings and increase them if necessary
  3. MySQL timeout:

    • If the script is timing out due to database operations, you may need to adjust MySQL timeout settings
  4. Check server resources:

    • Ensure your Lightsail instance has sufficient CPU and memory resources to handle the installation process
  5. Examine error logs:

    • Look for Apache error logs, PHP error logs, and MySQL error logs for any specific error messages
  6. Bitnami process:

    • Try stopping the Bitnami process before running the WordPress installation: sudo /opt/bitnami/ctlscript.sh stop
    • Verify it's stopped: sudo /opt/bitnami/ctlscript.sh status
    • Check for other processes using port 80: fuser -n tcp 80
    • If necessary, terminate processes not needed: fuser -k -n tcp 80
  7. Network issues:

    • Ensure there are no network-related issues preventing the installation from completing
  8. Try a manual WordPress installation:

    • If the automated script continues to fail, consider downloading WordPress manually and setting it up through the web interface

If these steps don't resolve the issue, you may want to consider creating a new WordPress instance in Lightsail and migrating your existing content, as newer instances may have updated software and dependencies that could avoid such issues.

Remember to back up your data before making significant changes to your server configuration.
Sources
Getting 504 Gateway Time-out on Lightsail IIS running PHP scripts | AWS re:Post
Troubleshooting WordPress setup failures in Lightsail - Amazon Lightsail

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.