Website changes – again

I relatively recently posted about moving my website to WordPress. This actually still holds true, but I’ve given the website a new look and made some changes to the deployment routines.

Now I have a solid development focused foundation based on Trellis.

My website is my playground. This is where I can freely play with any new technologies that I come across and just have some fun. It’s important to me that some of the things I do on the computer is just for fun, and not only work related – there’s quite a lot of that.

My previous WordPress setup was just a Digital Ocean droplet created using their One-Click WordPress installation. This works fine if you just want a website up and running where you can add a theme and your favorite plugins and start typing. But it gets a bit trickier when you want to have a local development version of the site on your computer and a production version, and even maybe a staging version, running live on the internet.

This is where Trellis comes into play. It’s a ready-to-use setup based on Bedrock and Ansible and lots of other good stuff that makes it really simple to get up and running with three different environments:

  • Development
  • Staging
  • Production

The workflow for setting up a new site once you have Trellis installed is something along the lines of:

  1. Run trellis new
  2. Do some small adjustments to a couple of configuration files for the hosts (servers) and the various environments
  3. Run trellis provision staging
  4. Create a git repository of your project and push it to ie. Github
  5. Run trellis deploy staging

And voilà! Your site is now deployed to the staging server. Of course, you must have set up a server somewhere to use as a staging server. The same goes for the production environment.

In addition to this, I use the WP DB Migrate Pro plugin(s) so that I can easily migrate my database and media files from one environment to another.