domain change give fatal error (3 posts)

  1. EnderWiggin
    Posted 1 year ago #

    I built a new WP site under one domain (company.ca) and now I am trying to change the WP database (WP options siteurl and home) and the general settings to match 'company.com', which works fine for the website (in other words, when you browse the site you always see 'company.com' in the URL, but I can't log into my WP admin, and get the following error:

    Fatal error: Call to undefined function wp_get_current_user() in /homepages/31/d461939155/htdocs/wordpress/wp-includes/capabilities.php on line 1286

  2. EnderWiggin
    Posted 1 year ago #

    Never mind, I finally figured out that the WP-Client plug-in was causing the issue due to its licensing for a specific domain.

  3. Mick Levin
    Posted 1 year ago #


    That's a problem with compatibility with one of few plugins. Try to deactivate them all, then activate one at a time, and see which one breaks the site.

    There are many ways to deactivate all plugins, my preferred one is to update the MySQL database, the table wp_options, record active_plugins. Save it's old value somewhere, and replace with this:


    In my case the guilty plugin calls the function "current_user_can" at improper time.

    Your case could be the same - most likely, it calls current_user_can() right from the constructor, rather than from a method, which has to be called via add_action ('init', ...).

    It might be something new to WP 3.8 - at the time the plugin is being constructed, the wp-include\pluggable.php had not been called yet, and the function wp_get_current_user is not being defined yet.

    So it's up to the plugin's author to fix that.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.