Reputation: 43
I'm getting an error on my WordPress website when I moved it from one server to the other
The error I get is error 500 This page isn’t working
I get this error on both the website and the administrator
When I check the log I get the following error
Got error 'PHP message: PHP Fatal error: Call to undefined function _wp_get_current_user() in /public_html/wp-includes/pluggable.php on line 70
I'm thinking I'm getting this error because there is no current user since the website has just moved location and its some caching error or something
When googling this error I get many issues with plugins, but since the website works on another server I'm assuming that plugins shouldn't be the issue.
I have no idea if that's how it works, but I'd really prefer to fix this without having to hack the Wordpress files too much. Is there anything I can do to fix this?
Upvotes: 0
Views: 1435
Reputation: 51
In my case, changing PHP version in Server Control Panel fixed the problem after migrating from Linux server to Windows.
i.e In Plesk control panel: Open Related Domain > Go to Hosting Settings > PHP support (PHP version) and change it (for me, downgrading version solved 500 Error).
Upvotes: 0
Reputation: 134
This could have many reasons. In particular, I can't relate to anything, but this could be incompatibility issues with your new hosting. Its best to contact your hosting provider.
This could be:
I would first disable all plugins (by renaming the plugins folder to something else) and test if the issue is still persists.
Upvotes: 2