Fatal error trying to migrate live site to staging environment

Hi-
I’m trying to migrate a live site to a staging server and I’m getting the following fatal error. So I can’t get in and do anything at all to troubleshoot.

Error:
Fatal error: Cannot declare class Cornerstone_Element_Manager, because the name is already in use in /www/wp-content/themes/pro/cornerstone/includes/classes/elements/class-element-manager.php on line 3

When I try to load the site in a browser, I get this:

Hi @tmroberts,

Thanks for reaching out!

It would be best if you let us know the process you’ve made migrating the live website to staging. In that way, we can help you with your issue.

On the other hand, you can also check our documentation on how to migrate your website.

Hope that helps and let us know how it goes.

I tried it first using an Updraft plus backup, saved to Google Drive. Tried using that backup on the new server and none of the media files imported, among other things.

I then had Flywheel (my host) perform the migration and their process turned up the error I shared above.

At this point, your documentation is not helpful for me because I’m just getting a white screen and the above error message on my site. I can’t get to the Wordpress admin at all.

Hello @tmroberts,

A Fatal Error could be caused by PHP exhaustion or that of a PHP script coding. Base on the Error Message in your first post, it seems that the standalone Cornerstone plugin is active while the Pro theme is active. Please delete the Cornerstone plugin in your plugins folder and then test the site again. It is best that you also give us access to the FTP so that we can easily access the files while troubleshooting on this issue.

Best Regards.

Flywheel was able to revert to a generic WP theme so the site is at least accessible, but due to old Cornerstone code, a lot of it is jumbled. I am not seeing the standalone Cornerstone plugin active at this time. I’ll get the FTP info, but in the meantime, they also said this:

Checking the site’s error logs, I’m receiving the same error as before:

Fatal error: Cannot declare class Cornerstone_Element_Manager, because the name is already in use in /www/wp-content/themes/pro/cornerstone/includes/classes/elements/class-element-manager.php on line 3

It could potentially be a conflict with a plugin on the site that declares the same class or perhaps simply redundant code in the theme files. I’ve gone ahead and reverted the site back to a default WordPress theme so that it is accessible. I would suggest reaching out to the theme developers with the above error to see if they can provide any insight on a resolution.

Hello @tmroberts,

The Cornerstone_Element_Manager is used in the Cornerstone plugin. If the plugin is not active, one of your active plugins could be causing this. It is best that we log in to your FTP and double check your files so that we can dig deeper to know what is going on or what is causing this error.

Thanks.

this forum wouldn’t let me respond to this message with a secure note, so I dropped the FTP info into the prior message as as secure note

Hello @tmroberts,

Your staging site is now back online with the Pro theme. Please delete the " X – Email Forms" and the " X – Facebook Comments plugin. You will have to install the latest version in Pro > Extensions section. And please make sure that all your plugins are up to date.

Kindly let us know how it goes.

Looking pretty good, but I’m noticing that there are a bunch of images missing. Any idea? Some are there (major ones), many are broken. I had to reassign the menus, but those seem to be working ok now.

Hello, @tmroberts,

It seems that the URLs are not fully replaced while moving the site from productions to staging or staging to productions and that causes the Mixed Content issue [ HTTP and HTTPS ] blocking to load of the files.
I would suggest you replace the URL properly and check this again, there are many URL replacement Plugins available in WordPress which help you to replace the URL.
This article will be helpful in this:https://www.wpbeginner.com/plugins/how-to-update-urls-when-moving-your-wordpress-site/

Hope this helps.
Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.