WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

WP Subdomains

WP Subdomains is a plugin for WordPress that allows you to setup your main categories, pages and authors as subdomains.

Subdomain Setup

The plugin uses the Category slug, Page slug, or Author name as the subdomain name.

You'll need to configure your webserver for each subdomain you want to use. It uses the same wordpress install as your main blog. If you run your own server you should know how todo this already (Apache users can just add ServerAlias to their existing vhost) If you use managed hosting then add a subdomain and set it's document path to that of your main blog.

Be sure to add a DNS entry to point your subdomains to your server.

Note, some hosting services allow a forward all rule that will forward all subdomains to your server.

For each Category you want to convert, edit the category in wordpress admin and enable the "Make Subdomain" option.

For each Page you want to convert, edit the page in wordpress admin and add the custom field wps_page_subdomain with value "true"

For Author subdomains just switch enable the "Activate Author Subdomains" setting. You cannot pick and choose which authors are subdomains. It is either all or none.

Plugin Configuration

Main Domain

To use the subdomain blog feature (e.g. main page at http://blog.mydomain.com) you’ll need to enter your blog domain (e.g. mydomain.com).

Disable Plugin

Allows you to disable the plugin functionality whilst still being able to configure it

Make all Subdomains

Makes all main categories into subdomains by default, this can be overridden in the category settings

Activate Page Subdomains

Enable this if you want to make use of the Page Subdomains feature

Activate Author Subdomains

Enable this if you want authors to be subdomains. Note you can't configure which authors, it enables them all.

Activate Subdomain Themes

Turns on the custom themes for subdomains so you can have them display in a different theme to your main site

Redirect Old Urls

Will give 301 redirects to people coming to Subdomained Categories and Pages on old URLs. Doesn't work yet for posts.

Keep Pages on Subdomain

Activate this for links to wordpress Pages to stay on the domain being viewed, unless they are category tied or subdomains themselves.

Subdomain Roots as Indexes

Activate this for subdomains root pages to be treated as an index page rather than an archive page. (On by default prior to being an option - See NOTES section).

Use Archive Filtering

If you're on a Category or Author subdomain then date archives will show only what belongs to that Category/Author

Use Page Filtering

Turns on the ability to tie pages to specific subdomain categories

Use Tag Filtering

Viewing Tags on a subdomain will show only the posts that belong to the subdomain you are on.

Category Configuration

Make Subdomain

Will turn this Category into a subdomain

Exclude from All

When using "Make all Subdomains" will exclude this category

Select Category Theme

Select the theme for this category to use, needs "Activate Subdomain Themes" turned on to work

Custom Link Title

Add a custom title to the links to this subdomain

Show only tied pages

When viewing this subdomain will filter out pages not tied to it.

Page Configuration

Subdomain Page

To make static pages act like subdomains, create a custom field variable wps_page_subdomain and set it to true.

Custom Theme

To set a theme for a page subdomain, create a custom field variable wps_page_theme and set it to the theme that you want to use. The theme name is the same as you'll find it on the edit categories page. Themes only work for pages that are setup as subdomains.

Tie a Page to a Category

To tie a static page to a subdomained category, so that it displays this URL category.yourdomain.com/static-page, create a custom field variable wps_tie_to_category and set it to the category ID.

Show Page on all Categories

To make a page show on all pages even if a category is set to only show tied pages, create a custom field varaible called wps_showall and set it to true.

Notes

  • If using Subdomains you'll probably want your cookie to span the subdomains and not just your own domain. In order to achieve this you need to add an option to your wp-config.php:

    define('COOKIE_DOMAIN', '.mydomain.com');

    Where mydomain.com is your domain name. Remember to add the preceeding dot (.) as this is what makes it work.

  • In 0.6.1 Subdomain Roots as Indexes became an option where before it was just on by default. If you want your subdomain root pages treated like your main blog index then switch this on. The differences you'll see are down to how your theme handles an Index compared with an Archive.

Requires: 2.7 or higher
Compatible up to: 2.9.2
Last Updated: 2009-12-30
Downloads: 21,031

Ratings

4 stars
4.3 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

33,3,1
100,1,1
100,1,1 100,1,1
0,6,0 100,1,1
100,5,5
83,6,5
33,12,4
18,11,2
0,1,0
0,3,0
0,2,0
100,1,1
100,1,1
31,13,4
0,4,0
0,7,0
0,1,0
0,2,0
0,2,0
50,2,1