Why can't I change the WordPress address URL and site URL on AWS Lightsail? Seeing a gray color, how to resolve this issue?

1

I am using AWS Lightsail. I created a website in WordPress, but I couldn't change my WordPress address URL and site URL. It shows a gray color. How can I solve this problem?

asked 10 months ago486 views
1 Answer
1

Hello.

I think it is possible to change this by directly changing the following settings in "wp-config.php" or by directly rewriting the database table used by WordPress.

define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/');

For example, if you change the following, the site address will be changed to "https://example.com".

define('WP_HOME','https://example.com');
define('WP_SITEURL','https://example.com');

If you want to be able to change it from the WordPress admin screen, you can do so by deleting the site address setting itself from "wp-config.php".
I think you can change it from the management screen if you change it to a comment as shown below.

# define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/');
# define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/');

https://wordpress.org/documentation/article/changing-the-site-url/

profile picture
EXPERT
answered 10 months ago
profile pictureAWS
EXPERT
reviewed 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions