Support » Fixing WordPress » Help with Localhost

  • I did a dumb dumb thing. I was running my site: localhost/ctrgroup off of mamp when I realized I typed the site in wrong. I changed the name of the site to localhost/ctrgrp. Now I cannot get to my site and I don’t know what to do!!

    Please help!!


Viewing 7 replies - 1 through 7 (of 7 total)
  • Where did you change the URL? If you changed it in Admin->Settings->General, you may be able to just rename the ‘ctrgroup’ folder under mamp to ‘ctrgrp’.



    You can export the DB, do a find and replace, the reimport the DB.

    You have several options:

    1. Login to phpMyAdmin, and manually change the “siteurl” and “home” records in the wp_options table.
    2. Open up wp-config.php, and add these lines:


    Then you may access your site. Go to admin, change back the site url on the admin page as well, then remove the above lines from your wp-config.php.

    For more options, see:

    @cooper dukes: A simple find and replace will not work because the urls and paths are serialized in some database records. Replacing one string with another of a different length will break the serialization.



    Hmm, can you comment on any exact issues that a find/replace would create? I’ve used that method to migrate 100s of sites, and have never had any issues. says ‘widget or theme’ issues, but no anecdotes come to mind.

    Any theme or plugin using the Settings API will store data in serialized arrays. My own themes, for example, store their options in such arrays. Due to the serialization, these will be (at best) completely missed by a basic search & replace or (at worst) be totally mangled. It is an issue that we do see here from time to time on the forums.

    Here is a sample option_value from a local site database:


    It gives the URL for a logo. The length of the URL string is 61.

    If I replace ‘localhost/test’ with ‘’, the length of the string changes without changing the ‘s:61’, and the logo image will not be found.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Help with Localhost’ is closed to new replies.