1

Migrating between local and server with Wordpress (SQL) is a bit time consuming, and I'm wondering if there is a better way to do it. With Drupal, there is a module called BackUp&Migrate, which lets you push SQL updates immediately from within the Drupal framework to the server. Is there something similar for Wordpress? At the moment, this is my work flow:

1) Go into localhost/phpmyadmin and make a SQL dump

2) Log into cPanel -> PhpMyAdmin

3) Select db and drop tables

4) Import new SQL dump

5) Run a Search/Replace to update strings

6) Log into the site again on the server side and update permalinks

This gets a bit time consuming if doing it often. If anyone has a better solution, I would really love to hear it!:) Thanks so much!

1
  • 1
    Sometimes I rather import the SQL dump into a new database, that way I can always switch between the two by changing one line in the wp-config.php file.
    – gdaniel
    Jan 15, 2015 at 19:16

2 Answers 2

0

I personally use BackupBuddy (a paid solution, from iThemes.com).

For your scenario, you could install it on your local dev machine, and perform the following one-time actions:

  1. Add a one-time configuration for your server as a "Remote Destination" (including FTP/sFTP credentials and target directory).
  2. Copy an 'importbuddy.php' script to your remote server.

Then, whenever you want to migrate a new snapshot from your local machine to your remote server, you can with one click create a backup zipfile (either "Database Only", or "Full" which also includes all files) and have it sent to your server.

On the server side, all you'd have to do is:

  • Browse to the 'importbuddy.php' script and use its friendly wizard interface, making sure to choose "Delete database tables" in the "Advanced Options." (The script automatically and properly handles search/replace, for serialized data as well.)
  • Alternatively, if your local and remote environments are sufficiently "identical," and you have BackupBuddy installed on the remote server as well, you should be able to simply perform a one-click "Database Rollback" within BackupBuddy -- an operation that is usually used for backups made on that very same server.

For a non-paid alternative, I've heard good things about the "WP Migrate DB" plugin, although I have not used this myself.

1
  • I also user BackupBuddy. It's reliable and fast.
    – gdaniel
    Jan 15, 2015 at 19:15
0

When I discovered ServerPress to develop local and push WP sites to production, I have not looked back. The time it saves me in both set up of a local WAMP, creating of dev sites, and then loading painlessly the site to a server with a public face is worth every nickel for it. I no longer need to fuss with paths that break when going live, for example. I also Drupal and despite the module you reference, I have asked the developer of ServerPress to please fork ServerPress for use with Drupal. I encourage you to take a look at it. I tend to do things manually so it's a big deal for me to support a tool like this. I'm not sure I would encourage its use for someone who has no experience in setting up a server as it's helpful to go through the learning process. But in your use case, heck, using a hammer to push a nail is a lot faster than using the palm of your hand!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.