How to fix Error 404 when Password Protect a WordPress Subdirectory with .htaccess

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.

Disable update notification for specific / individual WordPress plugins

You should always keep your plugins and WordPress versions up-to-date to avoid any security vulnerability. However there maybe times when you need stop a plugin from updating, for example when you have modified it. The following code snippet will stop any update notifications for a specific plugin.

You have to put the above code at the end of your wp-config.php file.

* Don’t forget to change line 5 with the appropriate plugin name / path (eg. akismet/akismet.php for akistmet plugin).