• I am not sure if my website is updated to the latest Wp version. It was last updated at the end of 2016. I am getting this error when I try to access the website:
    Fatal error: Cannot redeclare class wp_user_query in /var/www/vhosts/annestandish.com/httpdocs/wp-includes/class-wp-user-query.php on line 17

    I cannot log into the admin, but I do have FTP access. Can anyone assist me with finding out why this site is giving a fatal error: annestandish.com

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter AnnieBVT

    (@anniebvt)

    I deactivated my plugins folder and the themes folder and I still get the fatal error message.

    You can’t deactivate (rename) whole themes folder. One theme needs to be active. Just rename your currently active theme’s folder and WP should default to TwentySixteen or so theme.

    Do you have MySQL access? If you have phpMyAdmin access, there are some things you can try.

    I have no idea how much you know, but if you can go to phpMyAdmin and go to the query page, you can copy/paste this code in, and it will hopefully solve the issue.

    UPDATE wp_options SET option_value='' WHERE option_name='active_plugins';

    Only do that if the error occurred after activating a plugin. That query will deactivate all your active plugins and hopefully get you back in.

    • This reply was modified 7 years, 10 months ago by Carl Wuensche.

    She already tried deactivating plugins…

    Thread Starter AnnieBVT

    (@anniebvt)

    Thanks for your replies. I should have been more clear but I only deactivated the child theme I created for this website. The other themes were not deactivated at the same time. I also renamed the plugins folder to deactivate them but am still getting the fatal error. For this error,
    Fatal error: Cannot redeclare class wp_user_query in /var/www/vhosts/annestandish.com/httpdocs/wp-includes/class-wp-user-query.php on line 17, what can I do to edit line 17? This is the code on line 17: class WP_User_Query {

    If you know how, could you login to your cPanel then go to phpMyAdmin and check your database for errors?
    Also, if everything fails, could you reapply WP update manually? https://codex.www.ads-software.com/Updating_WordPress#Manual_Update

    MAKE FULL BACKUP FIRST (from within your cPanel)!!!

    Thread Starter AnnieBVT

    (@anniebvt)

    Thank you everyone for your assistance with my website issues. I was able to restore previous versions of a few of the WordPress core files that were recently updated, and that worked.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Fatal error: Cannot redeclare class wp_user_query in /var/www/vhosts’ is closed to new replies.