After installing a plug-in in WordPress, I can’t navigate to my site or dashboard. I’m getting this error
Fatal error: Cannot redeclare class Mobile_Detect in
/home/stephen1/public_html/netflixnz.com/wp-content/themes/absolute/inc/core/classes/mobile-detect.php
on line 27
How can I fix this error?
go to FTP and open folder:
rename your theme folder to something else (for example “absolute_1”)
then go to admin panel and deactivate problem plugin. After that rename back your theme folder and reactivate it in admin panel.
After that as @rnevius mentioned, avoid declaring the same class more than once.
If a plugin has taken your site down and you’re unable to get into the dashboard to deactivate it, you can connect to your site via FTP, delete the plugin (or rename it), and WordPress will automatically deactivate it for you. Then you can investigate the code problem before re-activating it.