How would you update an old site to Bedrock/Sage?

So I recently started doing web development for a great non-profit, Team Rubicon, which unites the skills and experiences of military veterans with first responders to rapidly deploy emergency response teams. Pretty boss. Unfortunately, the site is a bit of a mess.

It’s currently running WordPress 4.2.7 with Sage 6.5.2, which was released super recently in…Feburary 2014 :cry:

The site was put together a while back by an agency, which seriously underbid the hours and so cut corners to save time/money by hard-coding most of the unique pages, so they don’t have actual editable fields in WP Admin. Then prior to me, two freelancers came in and made updates to content/functionality, and frankensteined some more code into the site. :imp:

The site is hosted on Media Temple’s DV hosting service, running CentOS 6.5, Apache 2.2, PHP 5.4, and MySQL 5.5.

For various reasons - security, compatibility, future-proofing, site speed, etc. - I want to refactor the site to run on Bedrocks, update the theme to the current version of Sage, update WP Core to 4.5.1, and update the server stack to PHP7/MariaDB/Apache 2.4/maybe ngnix.

Obviously, this is a large undertaking, and there are multiple interdependent pieces that might work when they are updated but break after another part gets updated.

So my question isn’t technical, but this: if you were in my shoes, how would you approach this problem? What would you do first? Update the server, then WP Core, then convert to Bedrock, then fix theme? Or fix theme, then WP Core, then Bedrock, then server? Or just say fuck it, and dump the DB, rebuild the theme from scratch, and start on a fresh server & Bedrock build? Whatever the path, I’ll be doing it on a staging server first so I’m not concerned with downtime during the process.

I’d like to also have Trellis in the mix, but I’m not sure I’ll be able to switch the production server from CentOS to Ubuntu, so I’m not focused on that part at the moment.

I appreciate any insights, thoughts, experiences, etc. that might help me out. Cheers! :grin:

There shouldn’t be a need for much downtime.

I would start by making a really solid backup and then server yum update and then upgrade (in-place) Wordpress and all the Plugins to the most recent versions. It’s a good time to update passwords/keys. If there’s any possibility of a security compromise along the years, this would be the best time to run a rootkit check, possibly a security Wordpress scan, change Wordpress Salts, remove Admin User 1, remove unused Admin users, remove all unused plugins & themes., etc., etc. IMHO, this paragraph are must-dos.

Then, I would re-create the site and sync the database locally into a Vagrant box under Trellis & Bedrock, and the existing Sage Theme that is running on the current server.

From there, you can decide what tweaks you want to make to the current Theme or to start fresh. Starting fresh with Sage 8 is going to be a much longer road. You might just find that deployment using your (new) Trellis & Bedrock will give you great performance gains plus HTTPS and set you up for a Theme renewal.

Edit: I can’t speak towards the functionality or limitations of the Media Temple’s DV service you are on. You may need to update the server/WHM/cPanel/Plesk some other way There’s no need to move up in a CentOS distribution upgrade at this time.

Edit2: The site looks cool. Good luck with it!

Edit3: Added remove unused plugins & themes to must dos.



I need to do some more testing, but I’m not sure I can do the in-place upgrade. I quickly made a staging server (also on Media Temple, so same exact stack) and when I upgraded to 4.5.1 some of the theme pages broke. Looking online I saw there were a few issues regarding jQuery:

It has been discovered that old versions of jQuery worked with an incorrect syntax. That bug was one amongst many bugs fixed in jQuery 1.12. The symptom of this problem is the following message (or something very similar) in the Javascript console when viewing the site in a browser:

Uncaught Error: Syntax error, unrecognized expression: a[href*=#]:not([href=#])

This is a bit of code that is in somewhat common usage. The problem is that it is incorrect. The link location (hash marks, #, in this case) should be quoted: a[href*="#"]:not([href="#"])

I didn’t see any applicable syntax errors in the template pages, but I’ll look again. If I can do the in-place upgrade, I’ll be a happy man :slight_smile:

Appreciate the recs in the 1st paragraph - I’ll definitely make sure to do all those things!

Is staying on the Media Temple DV a requirement? It sounds like a great time to move over to Trellis as well - it’ll give you the latest PHP, MySQL, nginx versions as you are looking for, and could probably save some money on the server even with a staging and prod server on Digital Ocean. That would be my suggestion.

As to rebuilding the theme, that would be entirely your call, none of us know how much work it would be re-building the theme for you. Depending on how messy the old theme is, I would probably suggest a rebuild just because you can start fresh on the latest Sage theme and also implement ACF fields or however you choose to do the custom content the way that works for you, rather than trying to refactor the last people’s handiwork.


It’s not a requirement, but for ease of consistency we might use their DV Developer service which is akin to DO - it can Ubuntu 14.04 so I’d be able to run Trellis. Either way, I think I’ll have Trellis set up whether it’s on DO or (mt).

Turns out I might be able to update in place - updating Core on it’s own didn’t break the custom pages, it was a plugin that got renamed when updated so wasn’t loaded.

I think I probably will end up rebuilding and using ACF or something similar. Thanks for the advice!