We have a lightweight and efficient deployment process that's the same for development and production

At Crowd we ship a lot of websites and even more code. Our deployment processes is tried and tested, relatively efficient, and can be broken into 3 chunks.

We also have an in-depth Flywheel deployment guide.

Step 1: Grab a copy of the site and database

Whether the deployment is dev -> live, local -> dev, or even live > local; the first step is always the same.

  1. Grab a dump of the database. We quite like using Sequel Pro for this.
  2. Locate the entire contents of the root web directory for your server and download it to your local machine if it isn’t there already. This serves as a backup of the system as well as providing means for a deployment.

Pro tip: For legacy websites, and some themes it’s often prudent to search the downloaded files for the old site’s URL and replace it with the new one.

Step 2: Provision an environment

This might be a live environment or a development environment, but the process is the same in broad strokes.

  1. Create a new site with one of our providers. This will either be TSO or Flywheel — AWS environments are more bespoke.
  2. Enable SSH if it isn’t already and put your public key in the appropriate location.
  3. Create a MySQL database if there isn’t one present (using a 32 character secure and random password) and keep a record of the details to hand.
  4. Input these database details into your local copy of wp-config.php.
  5. Upload all of the files you downloaded earlier. Pro Tip: rsync is a faster way of doing this if you’re comfortable with terminal.
  6. While the site is uploading, connect to the new database and import the dump you created earlier.
  7. Download a copy of Search and Replace DB and upload it to the server.
  8. Visit the directory and run a search and replace that replaces the website’s old URL with the new URL.
  9. Remove the Search and Replace tool from the server.

Step 3: Testing and DNS

Whenever we deploy to an environment (even a development environment) we test that the deployment has been successful. A quick list of things we check for would include:

  • Can visit the front end of the site without errors
  • Can access CMS without errors
  • Can upload media without errors
  • Can publish a post without errors
  • Forms work correctly and go to the right place.
  • Any analytics/tracking services are in place.
  • Google maps and other licensed APIs load without errors

In environments that don’t have domains pointed to them (usually just prior to go-live) we add an entry to our Hosts file so we can test the website before it goes live.

Provided the testing is successful we change the DNS ourselves or notify the client that the site is ready, along with the DNS records they need to change.

Be part of the Crowd

We're always on the lookout for talent, and currently have offices in the USA, Canada, UK, Dubai, and China.

If you fancy being a part of a global multicultural development team that strives to do the best work possible, email us at results@thisiscrowd.com