WOW … I’ve spend 6 hours(!) on fixing an interesting WordPress problem. The frontend of the site worked … but we couldn’t login into the backend, getting the “Error establish database connection”.
Troubleshooting:
- all directory rights and ownership were correct
- database settings in wp-config.php were correct
- php database testscript showed database connection could be made
- some strange caching settings, where the entire site didn’t seem to be parsed from the database but the cache, implying again no database connection could be made.
- owner of some cache files were apache:apache, after correction to right ownership problems still emerged
- mod_rewrite settings in .htaccess files seemed correct
- phpinfo() values were correct (with regards to phpsafe “off” settings)
Solution … login into db admin / phpMyAdmin, go to the table wpoptions. option_value 1 and 39 have to mention the site. Option 39 “home” was present, option 1 “siteurl” wasn’t present. Reinsert the value, and both frontend and backend were working again like a charm!
Cause? Unknown. Maybe site hacked? Additional advise: change all passwords.
A bunch of resources used:
- http://wordpress.org/extend/plugins/wp-super-cache/faq/
- http://wphelpcenter.com/plugins/wp-super-cache/
- http://forum.bytesforall.com/showthread.php?t=723
- My Dutch / NL WordPress Translation contributions: October 2022 - October 9, 2022
- My Dutch / NL WordPress Translation contributions: August 2022 - August 23, 2022
- [NL] Ultra Light digital nomad Europe travel with Ryanair / Wizz Air - August 20, 2022
- My Dutch / NL WordPress Translation contributions: July 2022 - July 27, 2022
- My Dutch / NL WordPress Translation contributions: April 2022 - April 2, 2022
- My Dutch / NL WordPress Translation contributions: March 2022 - March 10, 2022
- What is the best global travel community for 2022 ? - February 20, 2022
- My Dutch / NL WordPress Translation contributions: February 2022 - February 3, 2022
- My Dutch / NL WordPress Translation contributions: January 2022 - January 4, 2022
- My Dutch / NL WordPress Translation contributions: October 2021 - October 7, 2021