Support » Installing WordPress » Restoring DB and lost localhost

  • Resolved Raymond


    Hello Everyone,

    I’ve been going through a couple threads now and I feel like I’m on the brink of solving this issue. I just need a little push from the more experienced users.

    My situation in full:

    I first got my godaddy domains and immediately went and installed wordpress which was running on the web. I tinkered in that for a while until i got some tutorials from saying the best way was to go localhost. So I did.

    I’m running MAMP on my macbook pro. I installed it and wordpress locally and have been working for the last month preparing my website for upload. Today we were supposed to go live.

    I FTP’d all my wordpress file structure to Go Daddy server. The problem then became getting my .sql backup from mamp onto the FTP client so it could read it and upload it. At first i didn’t know how to do that but after some research i found how to export the .sql file from the phpmyadmin tool in MAMP. I uploaded the file to the FTP site and tried to restore the DB from there. However, on GO Daddy the file does not appear as an option to restore from. There is another file available which is half the size of my current DB.

    I’ve since created a new DB on GoDaddy and changed all the ‘hostname’,’password’, and ‘databasename’components within my wp-config.php file to match the settings of the NEW DB on my ftp client.

    My problem is now that:
    1) the database online has all the tables of the localhost site, but the changes i’ve made do not reflect on the site.

    2) my local host is not accessible. “Error establishing a database connection”

    I feel like I’m really close to solving this issue. Can someone please point me in the right direction. I appreciate it greatly.

    – Raymond

Viewing 9 replies - 1 through 9 (of 9 total)
  • Raymond


    It should be noted too that I was able to get a successful online wordpress log in with the new DB. However, none of the work that was done on the local host appears on the new DB’s WP site.

    I seem to get this error message when trying to run the SQL scripts on the phpmyadmin of the new DataBase.


    SQL query:

    — Database: mydatabase

    — ——————————————————–

    — Table structure for table wp_commentmeta

    CREATE TABLE wp_commentmeta (
    meta_id bigint( 20 ) unsigned NOT NULL AUTO_INCREMENT ,
    comment_id bigint( 20 ) unsigned NOT NULL DEFAULT ‘0’,
    meta_key varchar( 255 ) DEFAULT NULL ,
    meta_value longtext,
    PRIMARY KEY ( meta_id ) ,
    KEY comment_id ( comment_id ) ,
    KEY meta_key ( meta_key )

    MySQL said: Documentation
    #1050 – Table ‘wp_commentmeta’ already exists
    [ Back ]



    I did a complete table drop of the site and got all the scripts to run. Now when I load my website, the theme I purchased is running completely blank with no media at all. I think this is a good thing, because now I only need to figure out how to get all the media from my local host to the wordpress live site.

    Please help if you have any ideas!

    Thank you.

    During the migration process, it’s important that you copy over the wp-content folder and the Database. All your content and settings will be stored in those folders/ Database. Did you copy the wp-content folder over?

    I think you’re making this a lot harder than it needs to be. You should be able to export an .sql file from your localhost phpMyAdmin, and import it via GoDaddy’s phpMyAdmin. No FTP client should be needed for the database import, since phpMyAdmin handles the upload itself.

    Once you’ve uploaded all of your wordpress files via FTP, and imported your database via phpMyAdmin, all you have to do is change the ‘site’ and ‘home’ records in the wp_options table to match your live site’s domain name.

    Here’s GoDaddy’s help page on phpMyAdmin:



    Tim S: Yes during the FTP File Transfer I copied over all the localhost files from my localhost to the FTP server. The WP-content folder was included.

    Kionae thank you for your advice. I haven’t done that yet and am not exactly sure how to access the wp_options table. Could you elaborate on how to do that?

    Is that also the reason why my localhost isn’t accessible at the moment? Forgive me as I’m very new to all this and learning the hard way :/. Your help is really appreciated and would help me go live right away. I’d be very grateful for your help. 🙂

    Thank you



    I just added a database on my MAMP utility and named it the same thing that I named the godaddy DB. I used the same SQL query to load all the tables as well.

    Wondering if I’m getting closer to solving this issue….

    Oh the woes of being a newbie with a deadline! 🙁

    I’ll outline the way I move a site from localhost to a web server. Maybe that will help.

    1) Export the localhost database via phpMyAdmin and save it as an .sql file.

    2) Zip (or tar, on Mac) my localhost WordPress files for quick uploading. Optional step, but it makes the upload so much faster.

    3) Upload the WordPress files via FTP, and extract them if they’re zipped.

    4) From phpMyAdmin, create a new empty database.

    5) From phpMyAdmin, create a new user (under the Privileges tab) and give it access to the new database.

    5) Use the Import tab in phpMyAdmin to upload and import the .sql file from localhost.

    6) In phpMyAmin, locate the wp_options table and browse it. Find the records with a ‘key’ field value of ‘home’ and ‘site’. Edit those records and change their ‘value’ field value to match the site’s domain name.

    7) Alter the wp-config.php file to use the database/user/password for the database on the web server.

    8) Log into the site on the server.



    Kionae Thank you so much for that step by step. It’s really quite thorough and makes so that I can definitely follow the instructions. I’m going to definitely backtrack and go through this list to make sure everything is done. If it works I’ll most certainly post back and let you know.

    Thank you again!




    Thank you very much for your previous post. That was the ticket and resolved my issue. I appreciate it very much!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Restoring DB and lost localhost’ is closed to new replies.