Need help updating old Roots site to Sage

Hoping someone here can help. I inherited a site that was running WP 4.0.12 with Roots 6.5.1. No plugins and no child theme (and no idea if previous developer made changes to Roots without using a child theme).

As a matter of good practice, I updated to WP 4.5.3. Site still looks fine on front end, but on the back end I get an error: “Constructor method for WP_Widget in Roots_Vcard_Widget is deprecated since version 4.3.0”

I found this thread ( WP 4.3, WP_Widget syntax and older versions of Roots ) and attempted to make that change, but when I try to update the file I got an error about headers and it wouldn’t update the file. My next thought was to revert to my WP 4.0.12 backup via ManageWP, make the change, and THEN re-update to 4.5.3 but ManageWP is also unable to restore the backup (presumably running into these same errors).

My next thought was to try to get an updated version of Roots. A little research and I discovered it was rebranded as Sage some time ago. Downloaded Sage and attempted to install it. It installed but when I tried to activate I got: " Parse error: syntax error, unexpected ‘[’ in /home/content/03/4847903/html/MYSITE/wp-content/themes/sage-8.4.2/functions.php on line 12" And now anything I try to do, I get that error.

I have admin access to WP but I do not have FTP access to files. However, I do have control of the domain, so I could do a WP install on my server, re-point the domain, and then presumably ManageWP should be able to at least get me back to my 4.0.12 backup. Is that what I need to do at this point? What a mess! Help!

Your version of PHP is too old. You need 5.4 or newer. Update PHP and newer versions of Sage will load correctly.

Thanks for the reply QWp6t! My server is running PHP 5.5.37 so that doesn’t seem to be the issue.

That’s because your server can’t handle “Short Array Syntax”, which was introduced in PHP 5.4 and is used by Sage 8 (Roots 7 was the last version compatible with PHP 5.3). If you’re seeing that error, you’re definitely not running PHP 5.4 or above.
Is it possible there are multiple PHP versions running on your server? It sounds like the one actually running your code is out of date, I’ve had that happen a few times. You might need to talk to your hosting company about that.

Something that might help with this is that every version of Sage is tagged with a version number, so you can still download Roots 6.5.1 from here:

and then compare it against the theme to see if anything was changed by the previous developer.

If it was me, I’d use this method (probably using Git) to get a list of all the changes, and then re-apply them to a blank Sage theme. This would give me the chance to fix any issues, remove any outdated/slow code, and clean things up a bit in the process. It’s more work but could help a lot if you need to make future changes.

If you don’t have FTP access you probably want to move to your own hosting anyway, then you won’t have to deal with PHP header errors when trying to make simple changes to the code (like with the widget deprecation error).

Thank you QWp6t and chrisatomix! I finally found time to move the site over to my server and all those nasty errors due to the PHP version on the old server went away. So that’s the good news!

The bad news is, even on my server with PHP 5.5.37, WP 4.5.3, and Sage 8.4.2, the site was broken. All the content appeared to be there but it was as if it had no styles applied whatsoever.

So I reverted to my backup and now I’m back to where I started (WP 4.0.12 and Roots 6.5.1) - so the site functions and it’s on my server now, but I’m debating what to do next:

  1. Leave it alone and pray that security holes in old WP version don’t lead to it getting hacked.
  2. Attempt to update to the final version of Roots and see if that will work better with a newer version of WP (maybe I could get closer to a newer version of WP that way?)

Ideally I want it to be on the latest version of WP, but it sounds like that requires moving to Sage and I think I might be in over my head to get that to work properly. Like, I have HEARD of Bootstrap and Sass and have VAGUE notions about what they are, but they are definitely not in my skillset. This is a really simply 4 page site that I could probably redesign in another theme more easily than learning what would be required here.

Appreciate any more advice you all have… TIA

You don’t need Sage to use the latest WP although if you update to the latest WP there may be a few notices of deprecated theme functions (widgets come to mind).

Sounds like the ball is in your court: roll the dice with an upgrade and consider learning how to use Sage or just copy the theme using another starter theme you’re familiar with.