Fatal error immediately after installing

We recently purchased the X theme in order to update a client’s website, because for whatever reason WordPress says it’s up-to-date, when in fact the installed theme is using functions that were deprecated in PHP 7.2, but I digress.

Anyway, we downloaded the X theme from ThemeForest and uploading it according to the documentation at https://theme.co/docs/installation-and-validation (which ultimately places the X theme in a directory named “x” in the WordPress themes folder), however, upon reloading the page after installation, WordPress immediately encounters a critical error.

Looking through the debug logs, I noticed this one error that said…

PHP Fatal error:  Uncaught Error: Class "Cornerstone_Shortcode_Preserver" not found in .../wp-content/themes/x/framework/legacy/functions/plugins/cornerstone.php:255

So I decided to search the theme’s files to try and find that class, which I attempted with a string search recursively through each of the files…

 $ grep -rno "Cornerstone_Shortcode_Preserver" ./*

So, it would seem that the only instance of the string “Cornerstone_Shortcode_Preserver” is in the file triggering the fatal error, and the line of code triggering the error is this…

Cornerstone_Shortcode_Preserver::preserve( 'code' );

I searched these forums for posts regarding the same problem, but there weren’t any regarding that specific error (that had been resolved) that I could find. I did, however, come across this one post which made a reference to the path of the Cornerstone_Shortcode Perserver class, which was wp-content/themes/pro/cornerstone/includes/classes/classic/utility/class-shortcode-preserver.php. I noticed that the path mentioned was for that class in the Pro theme, but I checked to see if it was in the same spot in the X theme…and it is here where things got a little confusing.

The path to the Cornerstone_Shortcode_Preserver class did not exist on the X theme, as referred to by the aforementioned post, however, I did notice that there was a cornerstone.zip in the framework directory, and when I viewed the contents of that zip file, sure enough, that entire path was there. I don’t remember seeing any reference to unzipping that file, but I guess it it possible that the theme was supposed to do that and for whatever reason couldn’t. So I unzipped the cornerstone.zip file, which resulted in the class-shortcode-preserver.php file ultimately being located at wp-content/themes/x/cornerstone/includes/classes/classic/utility/class-shortcode-preserver.php.

However, when I reloaded the page, that same Fatal PHP error was being triggered (Uncaught Error: Class “Cornerstone_Shortcode_Preserver” not found…).

So…what gives? Why am I not able to install the X theme, strictly according to the documentation provided by the developer of said theme? On that note, why isn’t there a way to update the theme from within WordPress?
But beyond that, how can I get the website to a usable state with the X theme enabled, and preferably in a timely manner? We’re already stretching the budget just trying to get the theme updated, and we have actual development to do still.

BTW The website already had and outdated copy of the X theme, so I enabled a core theme (something like twentytwentytwo), and then deleted the old theme just to make sure there weren’t any conflicts with the old theme…in case anyone is wondering.

Hello Tim,

Thanks for writing to us.

It might be the issue of version compatibility issue, I would suggest you please sure your theme, plugins, WordPress, and PHP version(7.4) are updated as per our version compatibility page.

It is also recommended by WordPress as well please have a look at this article.

I would suggest you please contact your hosting provider to upgrade the PHP version to 7.4. After setting the PHP version to 7.4 and if the issue still persists we need to check your settings. I would request you, please share your details in a secure note. Please provide the following details so we can check it.

  • WordPress Login URL
  • Admin level username and password
  • FTP details

You can find the Secure Note button at the bottom of your posts


Secure note, attached.

Hey Tim,

The given WordPress credentials are not working, please double check and update them with the correct ones.

Thank you.

Hey Tim,

I installed the latest X version and Cornerstone in your site but I didn’t experience any issues or errors. I simply followed the installation instruction too.


If you install X next time, it would be best you record the steps and show us so we can replicate the issue.


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