• Resolved morepars

    (@morepars)


    I have had a WordPress site running on GoDaddy hosting for some months now. I wanted to try and install it on my local computer so i can test new ideas.
    I installed WAMP, and then I installed WordPress using instructions I got from Lynda.com where I named the DB WordPress and the DB User root and the DB Password Blank and the DBHost localhost. Poof, everything ran fine, and I had wordpress working and my theme Twenty-ten.
    The problem is I want my own website (my theme and my database), not this one. This is where I have problems. I used filezilla and downloaded my theme. I then went to phpmyadmin on Godaddy and exported my database. I then imported my database locally and it apparently renamed it to mysql (Godaddy had a different name). I have tried playing around with my config.php file but now can’t find my site when I go to http://localhost. Can anyone help me get my new theme, my database all linked up when I go to http://localhost?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The easiest way is to create the MySQL dump file on GoDaddy with
    Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT and
    Add IF NOT EXISTS
    checked.

    After downloading the .sql dump file, open it in a text editor (not a word processor). Do a search and replace on the dump file – replace all occurrences of the live domain (http://myrealdomain.com) with the name of the domain on your local install ( apparently its http://localhost ). Then save that edited dump file.

    Start up PHPMyAdmin on the local installation and do an Import to the entire database. You will be overwriting the existing tables (that is what having DROP TABLE checked accomplishes) and replacing them with the edited database dump file’s contents. (I suggest you back up the localhost database before you overwrite it with the dumpfile from the server, since you already have a working local installation).

    If the files from your theme, your plugins, etc. have been copied to the local install the theme from the live site should start appearing. If there is any chance of your local version of wp-config.php getting overwritten (if you are moving files from the server), first save it outside the local WP folder so you can copy it back into the local folder after moving files. The reason is the database configuration from the live site won’t work on the local site, and vice versa.

    Also if you have pretty permalinks enabled on the live site you need to have the top level htaccess file from the server copied into the equivalent location on the local installation.

    Thread Starter morepars

    (@morepars)

    First off, thanks for this. I would have been totally lost without this direction. I am so close now. I downloaded the database. I replaced morepars.com with localhost. I exported and imported the database just as you asked me to do. I have pretty links so I moved the htaccess file down from GoDaddy to my machine. When I go to localhost wp-admin and log in I see all my posts etc. so everything seems to be in place. The problem is when I browse localhost the formatting is not quite right (the them is there but not formatted properly. I have a custom theme a company made for me. It appears the sidebar is screwed up. And when I go to my links I get errors…for example, from my home page if i click the link to my blog I get an error. Any idea of what I can try to fix this one last piece? One thing I thought of is I do have some plug-ins installed. Would I need to install them on my local machine as well or would they have made their way to me via the export/import? Thanks again!

    Hi

    Usually the plugins install themselves. However you can certainly disable and enable them again.

    It’s also sometimes a good idea to reset your permalinks back to the default “none” and update that change. And then reset the permalinks back to what you want them to be. This forces WordPress to recreate its rewrite code. Sometimes that makes the links start working.

    Another thing that can happen is sometimes the code in text widgets gets mangled in this move. You say the sidebar is screwed up so check if your sidebar is using text widgets. (Dashboard / Appearance / Widgets) If it is, open the live site to the widgets page and copy and paste the contents of each widget from the live site to the local site. Make sure everything is set up correctly.

    Its hard to say from your description of the sidebar screwed up what is wrong. Obviously you can’t post a URL to your local installation. And even a screenshot is not very useful to someone who can’t see the actual site.

    If I found myself in that situation I would use Firebug to examine the code and CSS on the live site, in one browser window, and have the local site open in another browser window. I’d compare Firebug results in one window to Firebug results in the other window until I narrowed down the source of the formatting issues.

    If you’re not familiar with Firebug, its a Firefox addon for debugging code and CSS.

    See if any of these suggestions help.

    Thread Starter morepars

    (@morepars)

    Thanks again for these tips. I downloaded firefox and installed firebug, and went to my home page locally and remotely and matched them up. I found differences, which led me to chack my plug-ins on my local site. I have a bunch of plug-ins on my remote site but none on my local site. Apparently they did not make there way to the site (which I don’t understand because I copied my whole theme down). Any thoughts on what to do to get my plug-ins from Go-Daddy to install and work on my local machine? Thanks again for your help!

    When you say you copies your whole theme, the theme is in /wp-content/themes/

    There are other folders in /wp-content/ that also need to be downloaded.

    /wp-content/plugins/

    And possibly custom folders your installation uses. Using GoDaddy’s file manager, or an FTP program, compare what’s on the server with what’s on your local site. Everything on the server must be on the local site.

    Make sure you don’t overwrite your local versions of wp-config.php and .htaccess, which are in the root folder of the WordPress install – back them up if you are downloading any files into that root folder.

    Thread Starter morepars

    (@morepars)

    All of this info has gotten me to the brink of being 100%. I found widgets and I found php files (text and php that you can add to a sidebar) that I recreated on my site and now all the formatting is perfect. My problem is still links. But here is the catch, and I don’t think it is fatal. If I change from custom to the default structure on my local site, the links work fine. But when I return to custom and use what I have on Godaddy, which is: /%postname%/
    the links don’t work.
    This is not the end of the world and I am fully operational now. I would like for curiosity sake to know why it works with default but not custom, but I can do my work now. Thank you so much. I couldn’t have ever imagined I would have received such comprehensive and responsive help in this forum!

    Hi

    You are welcome. I use these procedures myself in my work so am familiar with how to do the site moves to local installs, and the types of problems you run into.

    I use the /%postname%/ myself so I know it works on local installs. I seem to remember I had to manually activate the Apache rewrite module before they worked.

    Try searching Google for this, if you are using WAMP:

    Apache mod_rewrite WAMP

    Substitute the package you are using (MAMP, etc.) for WAMP if using a different one. You should find instructions on how to activate the mod_rewrite module on your Apache installation. If its not activated that is most likely your permalink problem.

    Thread Starter morepars

    (@morepars)

    I have WAMP, and in Apache there is a list of modules, one of which is called rewrite_module. It was unchecked (apparently that is the default when you install WAMP). So, I checked it, and voila! my custom link structure works! I owe you a beer (or a case!) Thanks again!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Installing my Remote WordPress Site Locally’ is closed to new replies.