Cornerstone Killed my site

What does this mean?

Fatal error : Cannot declare class Cornerstone_Shortcode_Preserver, because the name is already in use in /var/www/wp-content/plugins/cornerstone/includes/classes/classic/utility/class-shortcode-preserver.php on line 8

There has been a critical error on this website. Please check your site admin email inbox for instructions.

Everything is up to date. Am testing my site on a beta server as my host wants me to update to PHP 8. Should I replace the cornerstone plugin? Thx!

Hey @markomark,

Thanks for reaching out!

In Cornerstone 6+ that file should be located here:

cornerstone/includes/classes/classic/elements/class-shortcode-preserver.php

But in the error above it claims to be here:

cornerstone/includes/classes/classic/utility/class-shortcode-preserver.php

I suspect what might have happened is the new files were added, but you still have the old files present in which case it would find both and crash like this.

Did you happen to update manually using FTP or a file manager? Often when updating that way it will replace existing files, and add files that don’t exist in the new locations but it doesn’t know to delete files that were relocated.

I would recommend fully deleting Cornerstone and reinstalling. A good way to do this would be:

  • Fully delete Cornerstone
  • Ensure X is on the latest version
  • Use the link provided by X in the dashboard to automatically install Cornerstone at the latest version.

Hope that helps and let us know how that goes.

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