For one of our Roots sites, a decision has been made to revert back the architecture into a “vanilla” WordPress site. I’d like to pick the brain of someone who could provide some advice.
My first thoughts are to create the wp-content/ directory move everything in there, and consolidate the functions.php file first - then move onto the database config and settings. Then attack all the php errors that pop up.
I’m also trying to gadge the level of effort this would take. So far it seems huge for one person.
Disclaimer: this isn’t a shot at the Roots.io system. Just a one off situation where this needs to happen.
It sounds to me like you’re trying to move away from Trellis and Bedrock, is that right? If so, I recommend setting up WordPress in a standard way, installing all the necessary plugins, and activating your theme, and importing your Bedrock database. It should actually work fine.
You have a fresh install of WordPress in VVV on your local machine with a different DNS name than the old “rootsified” site?
You have manually installed all of the plugins that were on the rootsified site on the new site?
You have installed the Sage-based site theme from the rootsified site on the new site?
Is the plan to keep using the Sage-based theme on the new site? If so, it should just work. If not, do you have custom plugins that might be referencing Sage’s namespaces? If you do, can you try deactivating those plugins?
If you plan on using a NEW theme, and NOT a sage-based theme, can you try activating “Twenty Sixteen” and seeing if the errors go away?
I’m sorry I’m not sure what would be causing these errors if you’ve activated your old theme on the new site --I’m hoping a clearer picture of the situation will help pin it down.
Like which places? In your theme? In your core files? In your plugins?
The theme you’re using gave you the exact place where it’s erroring. It cannot find the class Theme in the INC namespace. On line 77 of the theme’s functions.php file. I would start there, and try and find where that class is. I would assume in the theme, but possibly a plugin? INC obviously is not a Roots namespace or class, so it’s going to be hard for anyone here to debug further than the error you posted.
There’s a couple of things going on here that are confusing.
If you’re using this INC theme, why would it be using the Sage namespace anyway? The themes should be totally independent (unless one’s a child, which shouldn’t be the case with Sage).
As stated above, sage can work perfectly fine outside of bedrock, and any theme installed in a bedrock site will work (in theory) in any other site. It sounds like you’ve managed to make the INC theme require Sage, which, if true, is definitely not good.
Your error message indicates the directory is themes/INC whereas psr-4 is looking in themes/inc, this might be causing you issues. Have you checked if the INC\ namespaces are being loaded at all into your functions file?
I’d use WP Migrate DB Pro for the database and media files. Manually move the themes and plugins. Have done this before at request. Just make sure to do a find/replace in the DB to the new uploads directory as image linking will be broken.