1. Accessing and Editing the php.ini
file to change something like max-execution:
- SSH into your Lightsail instance: Use an SSH client to connect to your server.
- Navigate to the PHP configuration folder:
cd /opt/bitnami/php/etc/
. - Open the
php.ini
file with a text editor: Use tools likenano
orvim
to edit the file –sudo php.ini
- Locate the
max_execution_time
directive: This line will be set by default to a number like 30 or 120 seconds. - Change the value: Modify the number to your desired execution time (e.g.,
max_execution_time = 300
for 5 minutes). - Save the changes: In
nano
, pressCtrl + O
to save and thenEnter
to confirm.
2. Accessing and editing wp-config:
- access and edit the wp-config gfile
sudo nano /opt/bitnami/wordpress/wp-config.php
- find the settings that you want to change (or add) and do it. In particular I have to do this on lightsail to change the site settings from http:// to https://
- Once you’re done; Ctrl +O, Enter then Ctrl + X
3. Restarting Relevant Services:
- Restart Apache and php-fpm: After making changes to
php.ini or wp-config.php
, you’ll need to restart the Apache web server and the php-fpm process. You can do this with the following commands:sudo /opt/bitnami/ctlscript.sh restart apache
sudo /opt/bitnami/ctlscript.sh restart php-fpm