Yesterday I posted some general tips and tricks for WordPress beginners on how to edit WordPress files. The discussion came up in the comments about workflow when it comes to setting up a fresh WordPress install or deploying to a site live.
Below I’ll share the tools and workflow I use, but I’m fully aware my process could be improved, so think of this as a jumping off point for a great discussion in the comments on your own workflow.
Situations for Deploying WordPress
Here are some situations where you need to set up WordPress, clone or migrate a site:
- Totally new project (local install)
- Deploy local to live
- Migrate/clone live site to development site.
- Migrate/clone development site to brand new live site.
- Push changes from development site to an existing live site.
I’ll break out each of these below and which tools I use for which job
Totally New Project
For a local development environment, I used to use MAMP and a single WordPress install. Before you scream at me for just a single install, I’ll explain why: I could drop my entire library of themes and plugins into that install without replicating them a million times.
The beauty of it is that I can set up my Perfect (or “Blueprint”) Install (i.e. already have my basic settings , favorite plugins, etc.) and copy it all over the place. So, when I need to start a new project, I fire up Desktop Server, click a button, and voila! It gives me a fresh local install of WP based off my Blueprint. In all of two minutes I’m up and running with a local development site.
You can use the free version of Desktop Server for this.
Deploy Local to Live
Desktop Server is still my choice here, but you’ll need to upgrade to their premium license ($99.95) to use the direct deploy to live server feature.
The process is ridiculously easy (unless you’re pushing to a WPEngine server, in which case there are extra hoops to jump through). Desktop Server deploys both your database and your files and updates all instances of your site URL along the way. The premium version also supports MultiSite, if that’s something you need.
Now, Migrate DB Pro (which I’ll talk more on shortly) has the ability to push a local database up to a staging or production database. I discovered Migrate DB Pro after Desktop Server, so I haven’t tried out that feature yet.
Migrate Live Site to Development Site
Depending on the nature of a project, I might never do a local install and just develop on a designated development site. In this case, I want to take an existing site in its entirety and pull it over to a development site where I can tinker.
Enter Migrate DB Pro, which is easily the best $199 I’ve spent all year. An important distinction to note for this software… it’s Migrate DB Pro – not Migrate All Site Files Pro. This tool is best for moving databases from one spot to another, although they recently added a Media Files add-on that pulls over a site’s media gallery (super handy!). You’ll need to manually upload any themes or plugins you want.
So, my workflow looks like this: On the development server, I install WP, activate the same theme and plugins being used on the live site, and lastly do a database pull using Migrate DB Pro. Working in that order means that when the data comes in, it’ll automatically put widgets where they belong and restore any plugins or settings from the live site. If you work in the reverse order and bring over your data and then install theme/plugins, you’ll miss out.
Migrate Development Site to a Brand New Live Site
A year or so ago I started using ManageWP‘s site clone feature to copy a site (files + database) from one spot to another. While I loved the idea of the clone feature, it turned out a little clunky. For instance, the automated search/replace for dev URL to live URL was incomplete (URLs in widgets needed to be manually updated). Also, the clone feature seemed to only work on small sites. Larger sites timed out or just crapped out. I still like ManageWP for general site management tasks and scheduled backups, but I no longer use it for cloning sites.
I make the distinction of a “brand new live site” here because I want to emphasize that I’m doing a full clone of the development site to the new site – any existing data on the live site be damned and overwritten!
Migrate DB Pro is the winner here. Note that I do need a WP install plus theme and plugin files already set up on the live server, but once that’s done I can pull in the dev database and 1 minute later have my entire dev site replicated perfectly on my live server.
Push changes from development site to an existing live site
It’s confession time. This is the weakest area as far as a deployment routine. Let’s say I’m building a new theme for a client. The end deliverable is an installed theme on their server with their data. Doing a database overwrite isn’t ideal, but neither is waiting until the theme is live on the client’s site to go through all the settings and options ideal either.
For simple sites, there’s no true deployment. I just upload new theme files, activate a maintenance plugin, and work as fast as I can to bring the site back online (typically an hour or less). Can’t believe I just confessed that out loud.
For complex sites, I again go with Migrate DB Pro, but I ended up pulling the latest db files over to development, completing the site setup, and then pushing everything back over to live (so, overwriting the database). That means minimal downtime for the live site (typically 10 minutes or less). But, something in my gut doesn’t feel right about this and a database syncing option would be better.
What’s your Workflow?
How to you deploy WordPress? What are your preferred tools and workflow? Leave a comment below – I’m curious to hear.