• My site did not work when I typed its name. it was really simple wordpress site with only 1 post.
    It directed me to debug mode.
    I set the debug to true in wp-config file
    And I got the following message (I replaced my user name and my site name below):

    Fatal error: Uncaught Error: Class ‘WP_Object_Cache’ not found in /home/ my user name /public_html/my site name/wp-includes/cache.php:156 Stack trace: #0 /home/my user name/public_html/my site name/wp-includes/load.php(580): wp_cache_init() #1 /home/my user name/public_html/my site name/wp-settings.php(138): wp_start_object_cache() #2 /home/my user name/public_html/my site name/wp-config.php(90): require_once(‘/home/ my user name…’) #3 /home/my user name/public_html/my site name/wp-load.php(37): require_once(‘/home/ my user name…’) #4 /home/my user name/public_html/my site name/wp-blog-header.php(13): require_once(‘/home/ my user name…’) #5 /home/my user name/public_html/my site name/index.php(22): require(‘/home/ my user name…’) #6 {main} thrown in /home/my user name/public_html/my site name/wp-includes/cache.php on line 156

    Can you tell me how can I fix this? Is this first of all 6 errors or 1? As it goes up to #6. If 6, even if you cannot help with all, I appreciate if you could help wth any.
    So if I fix these all, will my site be ok?
    Why did this happen?

    • This topic was modified 4 years, 5 months ago by ketanco.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator James Huff

    (@macmanx)

    Try manually resetting your plugins (no Dashboard access required). If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel (consult your hosting provider’s documentation for specifics on these), navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue (theme functions can interfere like plugins).

    Hi

    Do you have any caching plugin? If yes, please try deactivating it and check if it helps.

    Regards

    Thread Starter ketanco

    (@ketanco)

    I will try and let you know. In the mean time what do you mean by default theme? You mean 2020 or 2019 or something or which theme?

    Default theme means the theme which comes with WordPress when you install it. Twentytwenty, Twentynineteen both are default. Most probably it will activate twentytwenty.

    Thread Starter ketanco

    (@ketanco)

    @macmanx
    thanks and I tried all, that you said but nothing works

    For example in the first link you referred me to, for the phpmyadmin option, my setting was already set to a:0:{}

    Then I tried the ftp option, but I only have one theme there, which was already default theme, twenty twenty.

    So what can I do now?

    This was a default wp site with only 1 post in it with only akismet as plugin and apparently even that was not activated I think

    • This reply was modified 4 years, 5 months ago by ketanco.
    Moderator James Huff

    (@macmanx)

    Try downloading WordPress again, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel (consult your hosting provider’s documentation for specifics on these), and delete then replace your copies of everything on the server except the wp-config.php file and the /wp-content/ directory with fresh copies from the download. This will effectively replace all of your core files without damaging your content and settings.

    Some uploaders tend to be unreliable when overwriting files, so don’t forget to delete the original files before replacing them.

    Thread Starter ketanco

    (@ketanco)

    wow it works thanks a lot
    does this method (deleting everything except wp-content and wpconfig file) apply to bigger sites too? or you suggested it because I said my site was very small with one post?

    If this method applies to all sites (assuming nobody messed with wp admin or wp includes folders, which I do not), then when I am hacked, I do like this, and even if it still doesnt work (i.e. something is wrong in wp-content folder as well), then all there is left for me to check is the wpcontent folder correct? it is much better than also checking wp-admin and wp-includes folders as well

    Moderator James Huff

    (@macmanx)

    The only reason I suggested it is that something was definitely wrong somewhere. ??

    We ruled-out the third-party elements (plugins and themes) so that left only the first-party elements (the core files).

    Always start with the third-party elements and work from there, because it’s almost always third-party elements.

    If you’re ever hacked, carefully follow this guide instead. When you’re done, you may want to implement some (if not all) of the recommended security measures and start backing up your site.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to fix the following fatal error’ is closed to new replies.