• 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!!

    Nicole

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’.

    cdukes

    (@walkinonwat3r)

    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:

    define('WP_HOME','http://your.correct.url.com/path/to/wordpress');
    define('WP_SITEURL','http://your.correct.url.com/path/to/wordpress');

    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: http://codex.wordpress.org/Changing_The_Site_URL

    @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.

    cdukes

    (@walkinonwat3r)

    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.

    http://codex.wordpress.org/Moving_WordPress#When_Your_Domain_Name_or_URLs_Change 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:

    a:1:{s:9:"imageLogo";s:61:"http://localhost/test/wp-content/themes/minddog/images/logo.png";}

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

    If I replace ‘localhost/test’ with ‘minddog.com’, 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.