I want to update a Bitnami WordPress website's site and home URLs in Amazon Lightsail.
Resolution
To update a Bitnami WordPress website's site and home URLs, complete the following steps:
-
Use SSH to connect to Lightsail.
-
Open the wp-config.php file from the main application configuration directory:
vi /opt/bitnami/wordpress/wp-config.php
-
Locate the WP_SITEURL and WP_HOME definitions:
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/');
-
Edit the domain name in the WP_SITEURL and WP_HOME definitions:
Note: Replace example_domain_name with your updated URL.
define('WP_SITEURL', 'http://example_domain_name/');
define('WP_HOME', 'http://example_domain_name/');\
-
Save the file.
-
To verify the change, open the site with the updated URL. If the site opens, then the URLs are updated.