Introduction to Wordmove – a WordPress Deployment Tool

As a PHP application, WordPress is often deployed using an older method: uploading files via FTP. This can be stressful and time consuming, especially when a heavy duty WordPress project has to be deployed.

There are quite a few tools like: Jenkins, Beanstalk, and Deploy; which promise a pain-free WordPress deployment via an automated approach. However, in this article, I’ll be introducing you to a powerful Ruby package — Wordmove, which offers a very fast and easy automated WordPress website deployment.

wordmove

So, What Is Wordmove?

Wordmove is a little Ruby gem that lets us automatically mirror our local WordPress installation and database data back and forth, from our local development machine to the remote staging server.

We can simply think of Wordmove as a Capistrano for WordPress, with complete push and pull capabilities. Or perhaps if we are very familiar with GitHub, we can think of Wordmove as Git, our remote WordPress acting as our GitHub repo, and our local WordPress installation as the local cloned fork of our repo.

Wordmove comes with a full support for both OS X and Linux operating systems, and also has support for SSH connections, while FTP is planned to be discontinued at some point of future development.

Benefits of Wordmove

  • Deploy Local WordPress to Live Site: Wordmove provides an automated and easy approach to deploying our WordPress site to a production server. We don’t have to go through the time consuming manual process, a simple command: wordmove push --all does all the work.

  • Push and Pull Capability: Wordmove enables us to push new changes to the production server, and also pull new changes like updated database from the production server. When backing up WordPress files and database manually, Wordmove can come in handy in making the process quite a bit faster.

  • Ability to Specify what to Push/Pull only: Wordmove understands that we won’t be interested in pushing all WordPress files at all time, so it comes with an option to specify what to push — database, plugins, themes, or uploaded media files only.

  • Work with Multiple Enviroments at a Time: It also allows us to work with multiple environments at a time, if we have staging site, production site etc. See this wiki article Multiple Environment Explained which has what you need to know.

  • It’s Super Fast: Pushing and pulling WordPress files with Wordmove is amazingly fast and easy. This is because Wordmove uses rsync which makes copying of files super quick and about 5-10 times as fast as FTP.

Installing Wordmove

Installing Wordmove is quiet easy, for Windows users. Ruby has to be installed first on the machine before moving on to install Wordmove. Windows doesn’t come with Ruby pre-installed, compared to Linux and some other Operating Systems. After installation, then we can proceed to run this command in the terminal or command prompt.

gem install wordmove

Wordmove Capture - Command Prompt

It’s important to note that, Wordmove does not come with any official support for Windows, see the windows (un)support disclaimer here; however, it doesn’t mean Wordmove doesn’t work on Windows (I personally use Wordmove on Windows). It is just that the Wordmove developers can’t help with problems concerning a Windows environment, just in case we have any issues.

Usage

    wordmove help

      Tasks:

        wordmove help [TASK] # Describe available tasks for one or more specific task
        wordmove init        # Generate  a brand new Movefile
        wordmove pull        # Pulls WordPress data from remote host to the local machine
        wordmove push        # Pushes WordPress data from local machine to remote host    

Movefile

Wordmove requires a Movefile — a YAML file with all the local and remote host information, which simply serves as a configuration file, see an example here, before any push or pull operations can be done. To create a Movefile, go to (cd in command line) in the WordPress root directory and then copy this:

wordmove init

This command generates a new Movefile in our WordPress root directory, we open it with any text editor and edit it with our settings. See this wiki article Movefile Configuration Explained to understand more about the supported configuration, and to have a more in-depth knowledge about Movefile.

Pushing All WordPress Installations to a Remote Server

Wordmove allows us to push all WordPress installations to our remote server by simply running a one line command in the terminal or command prompt without any stress.

wordmove push --all

Isn’t that great? After running the simple command, all WordPress installations will be transferred to our production site. When pushing only new files or modified files, we use the same command, as Wordmove will check the file differences and push only edited or new files; so no need to be worried about getting duplicate files pushed.

Pulling from Remote

Wordmove also allows us to pull some files from our remote server to our local server easily. We can simply run a pull command with an additional option of what to pull, for instance, let’s assume we want to pull an updated database, and new uploads, we run:

wordmove pull -dbu

Where dbu stands for database and uploads. See usage and flags explained for a comprehensive list of available flags and their explanations.

Pushing Specific Folder

Wordmove understands that we won’t be pushing all our WordPress files at all times, so it comes with an option to specify a group of files to be pushed; either our plugin files, themes, or uploads for example. Assuming we modified our theme, we can commit the changes to our remote server by running this command:

wordmove push -t

Where -t stands for themes, -u for uploads, p for plugins and d for database, depending on what we’re pushing.

Conclusion

Automated deployment saves us the time of doing repetitive tasks every time we start to deploy our WordPress project. It also helps to minimize the down time during deployment and eliminate common human errors such as missing files or uploading wrong files.

In this article, I have introduced you to Wordmove, the powerful WordPress deployment tool which helps to ensure an easy and super fast WordPress deployment. I’ve given you an overview of it’s benefits and demonstrated how to perform a basic push and pull operation using it.

If you’ve tried Wordmove, please feel free to share your experiences or opinions with us using the comments section below.

Article source: https://www.sitepoint.com/wordmove-wordpress-deployment-tool/

Related Posts