WordPress Developers – working with the AWS Lightsail Terminal? Here are a few commands that may be useful
WordPress in AWS Lightsail (Bitnami AMI)
If your instance was created from an AMI on or after version: "WordPress Certified by Bitnami and Automattic/5.8.0-2-r01 on Debian 10" after 05.08.21 use these commands
Update WordPress automatically without using FTP (wp-config.php)
define('FS_METHOD','direct');
Increase WordPress memory limit
define('WP_MAX_MEMORY_LIMIT', '512M');
Run mysql query from CLI
mysql -h localhost -u root -p bitnami_wordpress -e "SELECT * FROM wp_users"
How to swap out a string value from a large SQL file
sudo sed -i 's/CHARSET=utf8mb4/CHARSET=utf8/g' example.sql
If your instance was created from an AMI before version: "WordPress Certified by Bitnami and Automattic/5.8.0-2-r01 on Debian 10" before 05.08.21 use these commands