• I unwittingly changed the urls in general settings and lost access to my admin panel. I read that I could edit wp-config.php by adding:

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

    I was able to ftp to the site but when I add the lines above, all the code goes orange so I assume something isn’t right. And, how much of my url should I add? Do I need to put the www in and/or the /blog/ part as well, or even /blog/wp-admin?

    So far I tried a few options and uploaded but nothing has changed. Or does this require time?

    I am obviously not very knowledgeable in these finer points.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    Syntax is ok. Just remember to add it before require_once(ABSPATH . 'wp-settings.php');.
    If Your blog is accessible via `https://example.com/blog’, then You should paste that url in both define’s.
    This should be the base url of Your blog.
    Do not add wp-admin.

    Hope that helps a bit.
    Greetings

    Thread Starter mcconnell.susan

    (@mcconnellsusan)

    So I need to add the www?

    Would this be correct:
    define(‘WP_HOME’,’https://www.mycompany.com/blog’);
    define(‘WP_SITEURL’,’https://www.mycompany.com/blog’);

    or is it:
    define(‘WP_HOME’,’https://mycompany.com/blog’);
    define(‘WP_SITEURL’,’https://mycompany.com/blog’);

    I tried it both ways and neither worked. I was sure to put it above the require_once code.

    I also tried the Edit functions.php approach as suggested by www.remarpro.com, but no luck there either — tho I have the same questions about whether my urls are right.

    Do these approaches typically work and I”m doing something wrong?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Clarification editing url’ is closed to new replies.