Support » Fixing WordPress » Fatal error: Cannot redeclare get_available_post_mime_types()

  • I’m getting the popular error:
    “The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.”
    when logging on to admin dashboard.

    With this debug parse:
    “Fatal error: Cannot redeclare get_available_post_mime_types() (previously declared in ../post.php:6905) in ../wp-admin/includes/post.php on line 1194”

    Disabled all plugins. Not fixed.
    Disabled Theme: Not fixed.
    No restore link sent.

    Any ideas?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator t-p

    (@t-p)

    Please check the error logs on your server for a more specific error message, which may give a clue to why this is happening on your website/server. If you are using cPanel, the following tutorial has more information about the error log in cPanel: How to view cPanel Error logs . If you need help locating them, ask your hosting provider to help you with that.

    If you cannot find error logs or if you don’t find any helpful info in the error logs, try Enabling debugging .

    Got the error as as previously stated.

    Forgot to mention I also reverted back to php5.6 and no luck. Back to 7

    Moderator t-p

    (@t-p)

    This errors says your function is already defined ; which can mean :
    – you have the same function defined in two files
    – or you have the same function defined in two places in the same file
    – or the file in which your function is defined is included two times (so, it seems the function is defined two times)

    Yes, I read that part. If it’s not because of a plugin. And it’s not happening with a theme. And I haven’t changed any hard coding, what could be the cause of this? I am reluctant to remove that line of code.

    That function should not exist in the /wp-admin/includes/post.php file. The cause could be corruption from an incomplete install, or possibly from your site being hacked.

    Download the file to your local system and take a look at it. If you see signs of a hack, then you’ll need to take the necessary steps to clean your site. Otherwise, replace the file with a fresh copy. Make sure to delete the file on your local system after you complete your investigation.

    I checked all my WP sites and they all have the same line of code in that file. I removed it from the offending site and it works now. Not sure what other things it would affect.

    I had this problem and found that the CKEditor for WordPress plugin was the culprit on my site. I deactivated the plugin and all is well. Too bad because I really like that plugin.

    • This reply was modified 7 months, 1 week ago by amcgall.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Fatal error: Cannot redeclare get_available_post_mime_types()’ is closed to new replies.