• Resolved Steve Kimpton

    (@stevekimpton)


    I normally install WordPress in http://www.sitename/wp and, when the site is ready, move the public part to http://www.sitename using the method in codex.wordpress/Giving_Wordpress_Its_Own_Directory under “Using a pre existing directory install”

    This time I accidentally changed both the WordPress and site URLS to the root directory in the dashboard settings screen.

    This messes things up! I finally found codex.wordpress.org/changing_The_Site_URL and used the Relocate method to get out of the fix.

    This seemed to work but I now notice that shortcodes using the siteurl() function gives the old (sitename/wp) address.

    In the database options table, I see that siteurl is set to the sitename/wp and home is set to sitename although in the dashboard, WordPress Address (URL) is set to sitename/wp and the Site Address (URL) is set to sitename.

    Just reversing the database siteurl and home settings removes all the css formatting so is the wrong approach (or isn’t enough).

    Can anyone tell me all the relevant database and file settings should be to sort this out?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • This seemed to work but I now notice that shortcodes using the siteurl() function gives the old (sitename/wp) address.

    First makes sure your install is pointing at correct domain, then:

    Deactivate the shortcode plugin(s) and re-activate. Also make sure to not use server caching while in dev. mode.

    Thread Starter Steve Kimpton

    (@stevekimpton)

    Thanks for your thoughts Seacoast, I’ve now understood and solved the problem.

    There was nothing wrong in the code!

    In Dashboard… General… Settings, WordPress uses ‘Site Address (URL)’ to mean the address where users go to see the site. I assumed this corresponded to the site_url() function. But is doesn’t. What’s needed is home_url().

    While I was developing, they both resolved to the same place so everything worked. Because my difficulties came after initially messing up the move of the user location, I thought that was the cause of the problem so I was looking for a solution in the wrong area.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘site URL and home URL settings’ is closed to new replies.