wp-move

What’s happen with Wordpress ? The database contains the absolute root url of your site/blog. With this gem, you can change the root url with one command.

Workflow :

A friend need your help on a Wordpress site. You download the files from the FTP (for example, or SSH). Then, he sends to you the database (dump.sql). You open your local /phpmyadmin/ and import the dump.sql. Of course, you change the wp-config.php settings and put your own local database. (and add wp-config.php to your .gitignore)

Now, the dump.sql contains the production absolute url (www.example.com) and the site doesn’t work. You can change this url in the wall local databse using this Gem:

Usage

cd /my/wordpress/
wp-move rename my-local-wp-url

Example

cd /home/user/Work/site-wp
wp-move rename localhost/Work/site-wp

Contributing to wp-move

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.

  • Fork the project.

  • Start a feature/bugfix branch.

  • Commit and push until you are happy with your contribution.

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2012 Damian Le Nouaille. See LICENSE.txt for further details.