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.inifile with a text editor: Use tools likenanoorvimto edit the file –sudo php.ini - Locate the
max_execution_timedirective: 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 = 300for 5 minutes). - Save the changes: In
nano, pressCtrl + Oto save and thenEnterto 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 apachesudo /opt/bitnami/ctlscript.sh restart php-fpm
