When you try to password protect a WordPress subdirectory by adding .htaccess and .htpasswd under subdirectory, you sometimes (in fact most of the times) get Error 404 – Page not found when you visit that subdirectory location in the browser.
To fix this error, add the following line at the top of .htaccess located in the root of your WordPress installation (yes, root .htaccess and not .htaccess of your password protected subdirectory), and you’re good to go now.
ErrorDocument 401 default
Do you have any different solution? I would love to hear your comments.
After so many requests asking about “WordPress white screen of death”, I would like to quickly share my strategy I use in most of the WordPress installs I manage which allow me to quickly switch on debug mode when required.
In the file wp-config.php, which can be found in your WordPress root, search for variable WP_DEBUG and replace it with
Now you can open any page, and if something goes wrong there, like a white screen of death, you can add ?debug=debug_mode to the end of its URL and check what’s causing the trouble. Eg. http://www.mywordpresssite.com?debug=debug_mode
After CentOS 4 hit End of Life in February (No updates after 29 February 2012), you may have noticed the following error coming from the “yum” installer: not using ftp, http[s], or file for repos, skipping – 4 is not a valid release or hasnt been released yet
However, there is very easy way to get “yum” working again without upgrading everything to newer version of CentOS.
Login to your server/SSH using root
Open /etc/yum.repos.d/CentOS-Base.repo in an editor (vi/vim)
Comment out the “mirrorlist” entries
Uncomment the “baseurl” entries and change them to http://vault.centos.org/4.9/os/$basearch