I have a problem after migrating a WordPress site from Plesk and IIS to LAMP server.
I cannot access the Admin Panel, I can access /wp-admin/
and can login successfully but I get redirected to the home page and not to Admin Page.
If I set define('WP_DEBUG', true)
in wp-config.php
file I get this error:
Notice: Use of undefined constant _COOKIE - assumed '_COOKIE' in public_html/wp-content/themes/Avada/includes/fusion-functions.php on line 390 Sorry, you are not allowed to access this page.
This line has the following code:
if (!current_user_can('read') && !isset(${_COOKIE}['wp_min'])) {
I have manually added .htaccess
file during migration and its content is:
#BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
UPDATE
PHP version is 7.0.27 and used to be 5.4.
I have already tried:
- Renamed plugins folder
- Changed to default theme (my editing database entry in table options)
- Changed keys in
wp-config.php
Added to
wp-config.php
filedefine(‘ADMIN_COOKIE_PATH’, ‘/’); define(‘COOKIE_DOMAIN’, ”); define(‘COOKIEPATH’, ”); define(‘SITECOOKIEPATH’, ”);
None of these has helped. I still cannot access the Admin Panel. Error remains the same.