• I am not able to edit the site or home URLs in the WordPress admin area as they are grayed out. I did some research and was told that I could edit the wp-config file and change it. I did it the same way the tutorials said and it breaks the website every time. If anyone has any insight it would be greatly appreciated.

    Currently the config file reads:

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

    I was told to change it to this:

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

    but when I do that the site breaks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,
    Is the site located in a folder called Wordress? if yes then you need to have the URL like this https://example.com/wordpress

    Thread Starter bigmuffin117

    (@bigmuffin117)

    Thank you for your suggestion, that doesn’t work. It might be worth noting that this on a local server with Apache hosting. It is connected to my domain and is live, i just can’t change the viewed URL

    You need to make sure that the following two definitions are not declared already in your wp-config.php file. If they are then just change them, don’t add them in again.

    You then need to change the defined constants to this:

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

    Where your website address is yourdomain.com. If your website is in a subfolder, for example /myblog, it’d be:

    define('WP_HOME','https://yourdomain.com/myblog');
    define('WP_SITEURL','https://yourdomain.com/myblog');
    Thread Starter bigmuffin117

    (@bigmuffin117)

    thanks for the replies guys, I’ve managed to get it to https://mydomain.com/wordpress
    any tips for getting rid of the /wordpress part?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can’t edit site URL’ is closed to new replies.