• I have created a full wordpress website on localhost and would like to either upload it to a new domain, https://www.kristinpotenti.com and link it to my current live site (the blog) or merge it with my current live wordpress site kristinpotenti.com/blog. I used the same database during development of the new site that is currently used in the live wordpress blog. What is the best way to merge the content of the localhost site and the live site?

    Thank you-
    Kristin

Viewing 1 replies (of 1 total)
  • Hey, assuming your local host also contains all of your old content, I would just overwrite the remote database with your local copy.

    Definitely definitely back up your remote sites database first – but what I used to do was:

    1) Export the local database as an sql file- then run a find and replace – replacing all instances of localhost with your target domain name. You can do this a number of ways – via mysql commands through phpmyadmin or simply by opening the sql file in a text editor and running a find and replace that way.

    2) Log into your remote host, access phpmyadmin, access the target database – download a backup of the remote database. Put it somewhere safe.

    3) Drop all of the tables in the remote database.

    4) Import the local database in place of the remote (after having ran the find and replace in step 1)

    5) Make sure your wp-content folders match – ie. the active theme, any new plugins or media need to be present on remote as well.

    6) On remote, update permalinks.

    That’s it – if you screw up you can always drop what you just imported and roll back to the old remote database, using your backup.

    I have to say though, I now use WP Migrate DB Pro – – best money I’ve ever spent. 1 click database migrations and it works an absolute treat. They have a free version but I don’t believe it does local to remote – still, worth checking out for sure.

    Hope that helps – good luck!

Viewing 1 replies (of 1 total)
  • The topic ‘Merging Localhost site with current live site’ is closed to new replies.