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 before version: "WordPress Certified by Bitnami and Automattic/5.8.0-2-r01 on Debian 10" 05.08.21 use these commands

Setting file dir owner

				
					sudo chown daemon:daemon -R /opt/bitnami/apps/wordpress/htdocs
				
			

Setting file/dir permissions

				
					sudo chmod 644 /opt/bitnami/apps/wordpress/htdocs/.htaccess
				
			

Open wp-config.php in terminal editor

				
					sudo nano /opt/bitnami/apps/wordpress/htdocs/wp-config.php
				
			
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" 05.08.21 use these commands

Setting file dir owner

				
					sudo chown daemon:daemon -R /opt/bitnami/wordpress
				
			

Setting file/dir permissions

				
					sudo chmod 644 /opt/bitnami/wordpress/.htaccess
				
			

Open wp-config.php in terminal editor

				
					sudo nano /opt/bitnami/wordpress/wp-config.php
				
			

Restart Apache

				
					sudo /opt/bitnami/ctlscript.sh restart apache
				
			

SSL configuration

				
					sudo /opt/bitnami/bncert-tool
				
			

Access php-ini file for editing

				
					sudo nano /opt/bitnami/php/etc/php.ini
				
			

Get root/user password for new lightsail instance

				
					sudo cat /home/bitnami/bitnami_credentials
				
			

Installing awscli

				
					sudo apt install awscli
aws configure (add key, secret and region)
				
			

Copy content from one S3 bucket to another

				
					aws s3 sync s3://SOURCE_BUCKET_NAME s3://NEW_BUCKET_NAME
				
			

Debug to file (wp-config.php)

				
					define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define( 'WP_DEBUG_DISPLAY', false );

				
			

Update WordPress Automatically Without Using FTP (wp-config.php)

				
					define('FS_METHOD','direct');
				
			

Increase WordPress memory limit define('WP_MEMORY_LIMIT', '256M');

				
					define('WP_MAX_MEMORY_LIMIT', '512M');
				
			

Run mysql query from CLI

				
					mysql -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
				
			

Latest From @seahorsedata

On August 1st, 2021 Seahorse will begin to charge for our licensed software in Euro (€) instead of Dollar ($).
https://www.seahorse-data.com/updated-pricing/

The @SeahorseData software can migrate #WordPress sites to the following #AWS regions:

North America:
US East (N. Virginia)
US East (Ohio)
US West (Oregon)
Canada (Central)

EU:
Europe (Frankfurt)
Europe (Ireland)
Europe (Paris)

Britain:
Europe (London)

Load More...
WP Feedback

Dive straight into the feedback!
Login below and you can start commenting using your own user instantly