Password protect a subsite in a WordPress network with .htaccess

A wordpress network / multisite setup uses virtual directories.

When you have a wordpress network setup on www.yourdomain.com, you can have multiple blogs with only one WordPress installation, for example:

www.yourdomain.com
www.yourdomain.com/johndoe
www.yourdomain.com/janedoe

Suppose you want to password protect only one subsite e.g. ‘janedoe’, you can’t just create a ‘janedoe’ folder on your webserver with a particular .htaccess in it.

You need to create a secured environment for the virtual folder in your main .htaccess (where all other WordPress rules reside) using the following code:

SetEnvIfNoCase Request_URI "^/janedoe/" SECURED
AuthType Basic
AuthName "restricted area"
AuthUserFile /home/mydomain/.htpasswd
require valid-user
Satisfy any
Order allow,deny
Allow from all
Deny from env=SECURED

WordPress Admin Running Slow? Here’s How To Fix It!

I update my WordPress Network quite often. Especially to prevent security issues. Load time for typical WordPress pages is as good as perfect. However, I discovered on some of my WordPress Network setups the wp-admin pages suddenly took forever to load. I was waiting 2 minutes to load any wp-admin page. After a long search I discovered the problem was a faulty db_version value in the wp_options table.

wordpress-logo-stacked-rgb

I usually auto update my sites and found out this value was not updated (or could not be updated automatically).

WordPress Codex pages (http://codex.wordpress.org/Version_3.6) list this value for every WordPress version. For example: Version 3.6 has database version 24448. Thus, you should update this value manually in your mySQL database: change db_version (option_name) in wp_options to 24448 (for version 3.6). You should repeat this for every site in your wordpress network (wp_2_options, wp_3_options, …).

It’s as ‘simple’ as that!

WordPress: installatie, beveiliging, upgrades

(update augustus 2013)

WordPress installeren en beveiligen

WordPress gehacked?

WordPress plugins manueel upgraden?

  • Plugin deactiveren in beheer
  • Plugin map verwijderen van de server
  • Nieuwe Plugin uploaden
  • Plugin terug activeren: plugin detecteert zelf of database-aanpassingen nodig zijn

Nuttige plugins