Using WP Migrate DB in WordPress to Transition a Local Website to an Online Website (and Back Again)

Posted by on Nov 11, 2011 | 18 comments

 Recently, I had to spend a lot of hours figuring out the best, most streamlined ways of working with WordPress so that I didn’t want to kill myself. With the power that WordPress has and the open community that supports it, it’s a great way for many filmmakers to create some pretty incredible websites—if they can keep from drowning in all the PHP and nitpicky elements that go along with WordPress.

WP Migrate DB
Really powerful in its simplicity, WP Migrate DB corrects all the broken links in a database so that they can easily be connected in an online environment.

I’m going to pre-suppose that, if you’ve found this article, you have heard rumors of simple ways to deal with WordPress, but it hasn’t been terribly simple. I’ve played around with countless plugins that claim they’ll do it automagically but, invariably, things have broken down in the process. This deals with one plugin that I have found that seems to do the job perfectly with minimal amounts of headache: WP Migrate DB.

We’re presupposing you have a local server set up through XAMPP, WAMPP, or MAMPP and that you currently have your site running locally on http://localhost/NAMEOFYOURSITE/ (in Mac, it’s with http://localhost:8080/NAMEOFYOURSITE/ ).

Now, if you’re already up remotely and have been bit in the butt by working on a site live and need to do the reverse, this will work just fine, as well. (Now, I will warn you that you probably will be swapping through multiple databases for future times you go through this, but that’s not that much more annoying than multiple savegames in a video game you like playing.)

 

  1. Download “WP Migrate DB” from the WordPress plugin site.
     

  2. Activate it on your local site.
     

  3. Export your database with the following settings:

    A) Current (URL): http://localhost/NAMEOFYOURSITE/ (ex. http://www.microfilmmaker.com )

    B) New (URL): http://www.NAMEOFYOURSITE.com/NAMEOFYOURSITE (ex. http://www.flyingpoodles.com/wordpress )

    C) Current (File): C:\wamp\www\NAMEOFYOURSITE (ex. C:\wamp\www\wordpress )

    D) New (File): c:\wamp\www\public_html\NAMEOFYOURSITE (ex. C:\wamp\www\public_html\wordpress )
     

  4. Save SQL database to the correct location (the one you specified in option D) and it will, by default, add the code “_migrate” to the filename.
     

  5. Unless your database is very small, zip the database and name it: “YOURSITE_DB.sql.zip”
     

  6. Make a copy of all the files that are in your website within the folder you specificd in option B). (ex. http://www.flyingpoodles.com/wordpress )
     

  7. Online, create a new database in PHPMyAdmin on your control panel on your hosting server and name it whatever you like and they will add some additional code to it when it’s created. (ex. Luxor48_New_wp_database.sql )
     

  8. Add in a username and password that can access this database. (It doesn’t have to be the same as the one you had in your exported database, since that info will be stripped out in the export.)
     

  9. Now, with this empty database open, import the database you migrated earlier. It’ll take a few minutes to import and fill up the database.
     

  10. Open up the “WP_Config.php” file that is now in your online folder (ex. http://www.flyingpoodles.com/wordpress/wp_config.php) with a text editor and change the name of the database in this file (which would have been the same as the one you had used on your localhost) to the name of the new database you created in your online PHPMyAdmin and replace the username and password with the new database username and password you created.

That’s it. When someone goes to that folder online, it will automatically show your entire wordpress site. After you’ve made sure it’s working properly, if you want people to go directly to this folder, you can have your web hosting provider put a redirect to this folder as your main site. (Obviously, all of this effort just for the first time you set this up. After that, you’ll be able to directly import database files you migrate into your online database within PHPMyAdmin, or you can import only part of the database into it if you’ve chosen to export just part of the database from your localserver through your local PHPMyAdmin panel.)
 

Although there are 10 steps in this, this is currently as simple as it gets in the world of WordPress and, actually, only takes a few minutes to accomplish. Hopefully this spares you a lot of the frustration I’ve gone through recently!

 

God bless,

 

Jeremy

 

The director of two feature length films and half a dozen short films, Jeremy Hanke founded MicroFilmmaker Magazine to help all no-budget filmmakers make better films. The second edition of his well-received book on low-budget special effects techniques, GreenScreen Made Easy, (which he co-wrote with Michele Yamazaki) is being released by MWP in fall 2016. He's curently working on the sci-fi collaborative community, World of Depleted, and directed the debut action short in this series, Depleted: Day 419 .

    18 Comments

  1. Simply wish to say your article is as astounding. The clearness to your submit is just excellent and i can assume you are a professional in this subject. Fine along with your permission allow me to seize your feed to stay up to date with drawing close post. Thank you 1,000,000 and please carry on the rewarding work.

  2. Hi! Thanks for the tutorial. This plugin didn’t have much documentation and seemed a little daunting to me so it was nice to come across your step by step instructions.

    One question though. I have my site set up so that the index file is in a separate directory from the rest of the files (this whole thing: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory).

    Does this affect the migration instructions?

  3. http://merollismicropolis.com/prostomag/0eed8-80152-hamilton17.htmlハミルトン 腕時計 ジャズマスター,ハミルトン レディース,ニナリッチ 財布 ピンク
    ハミルトン 腕時計 メンズ 人気,ハミルトン レディース 自動巻き,ニナリッチ 香水 アーモンド http://costatransporteenorlando.com/prostomag/29c8f-90159-hamilton81.html

  4. http://keepyoungclub.com/prostomag/18b1a-20154-hamilton42.htmlハミルトン ジャズマスター GMT,ハミルトン ジャズマスター GMT,ニナリッチ 香水 横浜そごう
    ハミルトン 腕時計 メンズ おすすめ,ハミルトン カーキ フィールド,ニナリッチ 財布 ピンク http://columbusonlineauction.com/prostomag/2c39f-00159-hamilton86.html

  5. http://beautycenter-sharm.com/prostomag/13cf9-00153-hamilton29.htmlハミルトン レディース ベンチュラ,ハミルトン カーキ 替えベルト,ニナリッチ 時計 リボン
    ハミルトン ベンチュラ 中古,ハミルトン レディース 人気,ニナリッチ レールデュタン http://hammbonecatering.com/prostomag/1d93c-40156-hamilton53.html

  6. http://responsivevideomarketing.com/prostomag/1d93c-40156-hamilton56.htmlハミルトン ベンチュラ ダイヤ,ハミルトン レディース 人気,ニナリッチ レールデュタン
    ハミルトン レディース 腕時計,ハミルトン 腕時計 メンズ クオーツ,ニナリッチ 財布 年齢 http://simplisecurity.com/prostomag/115e9-90153-hamilton25.html

  7. http://www.angelsofgrace.com/prostomag/2c39f-00159-hamilton89.htmlハミルトン 腕時計 メンズ カーキ,ハミルトン カーキ フィールド,ニナリッチ 財布 ピンク
    ハミルトン ベンチュラ ベルト,ハミルトン 腕時計 メンズ カーキ,ニナリッチ 香水 トマト http://greatwideopen.org/prostomag/2004c-50156-hamilton57.html

  8. http://theheartcentreyoga.co.uk/prostomag/18b1a-20154-hamilton41.htmlハミルトン ジャズマスター シンライン,ハミルトン ジャズマスター GMT,ニナリッチ 香水 横浜そごう
    ハミルトン カーキ パイロット,ハミルトン 腕時計 メンズ カーキ,ニナリッチ 香水 トマト http://manifestorestaurant.ie/prostomag/2004c-50156-hamilton59.html

  9. http://chalkhillresidency.com/prostomag/18b1a-20154-hamilton39.htmlハミルトン ジャズマスター オープンハート,ハミルトン ジャズマスター GMT,ニナリッチ 香水 横浜そごう
    ハミルトン ジャズマスター,ハミルトン 腕時計 人気 カーキ,ニナリッチ 時計 修理 http://jerriforassembly.com/prostomag/02b85-30149-hamilton1.html

Post a Reply

Your email address will not be published. Required fields are marked *