Wordpress Subdomains 0.6.1 Released
It was supposed to be out Friday, but thanks to internet problems it’s two days late. However, the internet issues gave me a chance to fix the IE bug.
Here’s the low down on what’s changed:
Added Features
- Add options
- Keeping Pages on the subdomain, changed to an option for SEO reasons
- Removing archive status from Subdomain root pages
- Added wps_on_main_index custom field to make tied pages still appear on your main blog
- Useful if you have the subdomain indexes noindexed for SEO purposes
Bugs Fixed
- Now creates links for all subdomain pages not just five
- Fixed a daft problem that only put the first layer of sub pages of a subdomain page on that subdomain. Oops
- Fixed a problem regarding comments on 1st tier posts using /%category%/%postname% permalink
- Fixed a problem with filtering posts by category in the admin section
- Included an option to use a custom SQL query if you run into memory issues from large numbers of posts
- Fixed bug with IE and editing Category options
Download: WP Subdomains 0.6.1
Best to read the NOTES section of the Readme. Especially if you had memory issues with past versions.
I’ll try and improve the Readme in the next version.
April 5th, 2009 by
Alex Stansfield in
WP Subdomains, Web Development
Tags: 0.6.1
1,511 views | 46 Comments
Tags: 0.6.1
1,511 views | 46 Comments

Hi,
I tried to update from version 5.2 to 6.1.
I uninstalled the old version, uploaded the new one. on the plugin admin page I clicked activation and my admin turned into a blank screen.
The site did not show properly anymore so I reset the old version (thankfully I keep back-ups of my software…)
Lodewijk
Hi Lodewijk,
sounds just like the memory error. See the NOTES section of the readme file for advice.
Regards,
Alex
The Readme File is compressed & can’t be opened with a text editor.
What are you trying to open the readme file with? Opens fine here.
It opens, when I select a file to open it with. After unzipping the ReadMe file is compressed. So it looks like it’s not related to a specific file to open it with. I had to right click & open with notepad, vs. the file giving the notepad image to open it. And the file says its compressed even after unzipping it.
HI Darrin,
does it show any text at all? Have you tried opening it with Wordpad rather than notepad?
Regards,
Alex
It opens with notepad & I can see the text. I did not try wordpad, and I don’t want to risk trying. I juts copied it out & put it in a word document for myself.
I am still needing your assistance to get this plugin up & running on my site. I still can’t get it to work, even after reading the notes. I have already sent you an email to this fact & you already have access to my site. Can you assist me in getting this finalized?
Hi Darrin,
the file isn’t compressed. It just has no extension which means that windows asks you what you want to do with it. I’m sorry, I don’t develop on or specifically for windows machines as wordpress is cross platform.
As for your setup issue. You need to create a subdomain in your DNS for the “members” subdomain you want. This subdomain needs to have the same document root as your main wordpress site. Your hosting provider should provide a means for doing this.
Once that is done you need to configure the page you want to be a subdomain to be a subdomain. From the readme:
For each Page you want to convert edit the page in wordpress admin and add the custom field “wps_page_subdomain” with value “true”
Once that is done you can then configure the theme for the subdomain:
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.
I’m sorry, I only received your email this morning. I develop and support this plugin in my free time and I’ve been very busy with work recently. Unfortunately just sending me access details to your site without me asking for them doesn’t guarantee faster support. If you wish you can always donate some money, there is a donate button on the project page.
Regards,
Alex
Wordpress Subdomain Plugin Requiring Me To Set Document Path To Main Blog
Problem:
I have a wordpress blog that I want to create subdomains for categories. I want blog have a structure like this.
URL: category1.blog.com
URL: category2.blog.com
URL: category3.blog.com
But I don’t want to put separate installs of wordpress on each subdomain. The plugin readme file say.
“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.”
Question:
How do I set the document path of the subdomaina to that of my main blog? Is this possible? Any help will be much appreciated.
Who hosts your website? Do you run it yourself or go through a managed hosting provider (e.g. bluehosts or hostgator)? Most people use managed hosting and they should have a nice set of configuration tool to make this process fairly straight forward.
Regards,
Alex
I use byethost.com with Vista Panel. But I don’t see this option anywhere. Is the only way I can do it through hosting? Is there any code I can put in php or write in .htaccess. I been trying to figure this thing out for hours.
Unfortunately to setup the actual subdomain itself needs a change to your DNS and Webserver configuration. If you ask the technical support at bytehost hopefully they can help. Once you have a subdomain setup you can configure the plugin to use it.
Hi,
I found this video tutorial on setting up a subdomain:
http://byet.org/vistapanel-videos/Tutorials/Domains/Sub%20Domains/subdomain.htm
however it doesn’t seem to let you pick where the document root is located. I’d get in touch with byethost and ask them. The document root needs to be the same path as the main wordpress blog’s document root.
Ahh. So it should be where you create a sub domain? It seems that the level of hosting I have doesn’t have it. I’ll probably have to upgrade or find another host. Do you think it could be vista panel? Maybe you can do it in cpanel.
Does anyone have this working on dreamhost? I have tried to “mirror domain” within the panel but that does not work. I would appreciate any help.
Thanks
I think it’s a limitation in vista panel. Cpanel works because that’s what I use with hostgator.
I found a video tutorial for setting it up:
http://www.youtube.com/watch?v=AGNf1KBotfc
Where it says “Specify your web directory” that should match the same web directory as your main wordpress domains.
Hey there,
I am having problems with this template:
http://www.smashingmagazine.com/2009/02/23/magazeen-free-magazine-look-wordpress-theme/
When I use the subdomain plugin with this template it does not work. When I go to a subdomain category it shows all posts for all categories and not just the posts for the given category. When I switch themes to something else it works. Can you take a quick look? I love that theme and I love this plugin and I would love it if they could work together.
Thanks
Hi,
what do you have “Subdomain Roots as Indexes” set to in the settings?
Regards,
Alex
When I have it set to subdomain root as index, it shows all of the categories, but when I have “un-checked” then it works as I think it would by showing only the posts within the given category. Is it the index on the theme? I am not sure what to change.
Thanks
No guarantees this will work but you need to change the index.php file of the theme.
Find and change these 3 lines:
query_posts( ’showposts=2′ );
to
if (is_category()) {
global $cat;
query_posts( ’showposts=2&cat=’.$cat );
} else {
query_posts( ’showposts=2′ );
}
then:
query_posts( ’showposts=4&offset=2′ );
to
if (is_category()) {
global $cat;
query_posts( ’showposts=4&offset=2&cat=’.$cat );
} else {
query_posts( ’showposts=4&offset=2′ );
}
and finally:
query_posts( ’showposts=6&offset=6′ );
to
if (is_category()) {
global $cat;
query_posts( ’showposts=6&offset=6&cat=’.$cat );
} else {
query_posts( ’showposts=6&offset=6′ );
}
save that and set “Subdomain Roots as Indexes” as checked again.
No promises as I’ve not tested it. But I reckon that might do what you want.
Cheers,
Alex
I just started using your plugin. The only option checked is “Activate the Author Subdomains”. I notice however that the permalinks points to the “current hostname”. This leads to a duplicate content problem.
Example:
If I’m at admin.mydomain.com the permalink points to admin.mydomain.com/2009/04/16/test
If I’m at http://www.mydomain.com the permalink points to http://www.mydomain.com/2009/04/16/test
Shouldn’t the permalink always be .mydomain.com/2009/04/16/test ?
Maby there is a easy fix for this problem?
Hi Kia,
I have to say I think you might be the first person to use the Author Subdomains. It was originally a feature request of another user, but I’ve not heard back from them so I think they might have given up waiting. I did some testing on it on my dev box but not my live environment as it’s not something I wanted to use.
I will take a look at the problem that you noticed and see what I can do about it.
Cheers,
Alex
I’m using it with the new P2 Theme. I think that P2 together with author subdomains will be like Twit ter when cobined.
I was also thinking of using tags as subdomains. But that doesn’t seem to be possible using your plugin.
The preferred way of doing both thing together would be to use
tagname.tag.domain.com
username.user.domain.com
Just thinking out lound here
first: awesome plugin. you’ve solved a couple problems I was having, the solution being subdomains with separate themes, thank you very much!
My one issue is with attachments not respecting the subdomains. They’re still linking to the example.com address and not the x.example.com address. You can see this is action at my website, just be warned that I’m currently using the subdomains for nsfw content.
Hi,
sorry for the delay. Too busy looking through all your nsfw content
Seriously though, I’ll take a look into it and if it’s an easy fix i’ll send you a patch. Otherwise I’ll make sure I get it done for next release.
Cheers,
Alex
Hi, I tried to upgrade from 0.5.2 to 0.6.1 and I got this error:
Fatal error: Call to a member function get() on a non-object in /home/testsite/public_html/nymagtest.com/wp-includes/query.php on line 10.
I deactivated the plugin first and then copy the new files.
Any help will be extremely appreciated
Thanks
Hi Ricky,
what other plugins are you running?
Cheers,
Alex
I’m finding that this plugin is putting a considerable load on my sql server. I’ve been testing it out with Jerome’s Query Plugin, and for every page that has a link to one of the subdomain posts, there’s a few extra mysql queries for each post. I’m currently using wp-super-cache, and trying to get as much cached as possible, and I’ll admit that I’m not really familiar with how your plugin does the wonderful things it does. So, for my site, which usually gets around 70-80k page views a day, having this plugin and gamer-z’s rating plugin will bring my dedicated server to it’s knees. Maybe a solution for me on the quick side is to do a custom query for my main site that doesn’t include the category that I’ve set to a subdomain.
Is there any way to offload some of the mysql queries, perhaps by adding something to the htaccess files?
Is your plugin compatible with wp-supercache?
I currently have the ratings plugin disabled, and I’m testing out the memory solution that’s at the bottom of the readme file in the release package
Hi Tiki,
By “for every page that has a link to one of the subdomain posts” do you mean page in the wordpress sense or a index/category archive?
I think it could well be the function that was causing the memory problems. It’s used in a few other places too. Maybe I’ll just have to go back to using the custom SQL I was before where everything is fetched in one query.
Cheers,
Alex
That’s exactly what I mean. I haven’t noticed any problems since I tried out the memory solution, but I’m only getting something like 5k-7k hits per hour since I tried that
I may have jumped the gun a little bit in saying something, let me run it with that memory option for a while and see how it works out.
Hi Tiki,
using the built in wordpress function seemed like the right thing to do, the less custom SQL code and the more api functions I use the better. Or so I thought.
I’m pretty sure I’ll be removing those function calls and going back to my original SQL in the next release. Looking at the get_posts function itself it’s really major overkill for what I want which is just a list of all Post IDs for a category or Author. I’m pretty surprised that there doesn’t seem to be a wordpress function to provide this.
Also you’re attachments issue you had is still on my list. I started a new freelance job at the beginning of April, so had very little time to work on this plugin I’m afraid. Will try and get back on it this week. The attachments and SQL fixes should be pretty easy so maybe 0.6.2 will just be those. My list of new features I wanted to add can probably wait to 0.7.0.
Cheers,
Alex
hi and thank you for the great job you did with this plugIN…
got question.
I am gonna have numerous sub-domains based on categories..
cat1.dom.com
cat2.dom.com
etc…
for some of categories I need to have different PAGES assigned to such categories only (so when I under subdomain cat1.dom.com – i need to see links to only selected pages)
I assume it is connected with the thing called in documentation as “tied pages”,,,
unfortunatelly i cannot get what are these.. how pages tied with categories?.. is it standard functionality of WP?
Hello Allex,
Thank a million for this great plugin!
I’ve been using the Subster Rejuvenation for many years. And just b/c you released this awesome upgrade, I am able to upgrade several blogs to the latest versions of Wordpress.
I’ve recently installed your plugin and everything seemed to be working fine except for the blog title in the header of the sub-domained category pages.
When I go to http://casualgenius.com/ (blog home) the blog title is displayed as
CasualGenius.com but when I go to http://webdev.casualgenius.com/ (the sub-domained category page) –> the blog title is displayed as “CasualGenius.com – Web Development”
I would like the sub-domained category pages also to display just the blog title, without the category title appended to it.
Is there a way to do this? I’m familiar with editing PHP, so would you please suggest a simple hack / change of setting that would do this?
Appreciate your help.
RK
Hi,
I think you posted this before and I didn’t get back to you. Very sorry.
This is something I’ve been meaning to make optional. To stop it is very simple. Just comment out this line in subdomains.php:
add_filter( ‘bloginfo’, ‘wps_filter_bloginfo’, 10, 2 );
That should do the trick.
Cheers,
Alex
Thank you Alex! It worked great!!
Once again, thank you so much for creating this very useful plugin.
RK
Thanks alot for this plug-in. I have got it working on Dreamhost without any problem. So far I only have the Music Videos as subdomain.
You can check out the site but it’s only in testing phase.
Thanks for sharing this plug-in.
The subdomain feature / hack works but there’s a problem. The sub categories are not working and showing up as 404 – Page Not Found.
Ex. http://trailers.mydomain.com (works)
http://trailers.mydomain.com/action_and_adventure/ (doesn’t work)
Once I remove trailers from the URL and browse then it works.
http://mydomain.com/action_and_adventure (works)
By default all the sub categories are linked like this on my website:
http://maincategory.mydomain.com/subcategory/
How can I fix this?
Thanks
Hi,
Are you using some plugin that removes the /categories/ path from the category urls?
Cheers,
Alex
You’re a Lifesaver.
Thanks, I had to disable the plug-in Decategorizer and everything works fine now.
http://wordpress.org/extend/plugins/decategorizer/
not working with 2.8 wordpress: Invalid argument supplied for foreach() in…
Hi,
I can’t get the plugin to work. I use bluehost. I put the document root folder as /public_html but I get an error page when I go to the subdomain. please help
Hi Drew,
I’m going to need some more info. Can you give me the blog address and subdomain address. What version of wordpress? What is the error page you get?
Regards,
Alex
my blog address is drjimerson.com
subdomain is http://breast-augmentation.drjimerson.com/
I set the subdomain directory to my home directory and now http://breast-augmentation.drjimerson.com/ is resloving to my home page and not to my breast augmentation page
Hi Drew,
I just released a new version (0.6.6) which fixes a pretty major bug for new users.
Can you try this out and let me know how you get on.
Cheers,
Alex
I’m trying to get the subdomains plug in to work using Dreamhost. Instructions say I need to set the document path so it’s the same as the main blogs. I just don’t see a way to do this. I set the web directory to the host domain, but I still see a permalinks not configured messages when I go to the categories section of the plug in. I’m sure there is a simple solution to this. Any help is appreciated.
Also I have my site in preview mode, using dreamhosters.com. Will this affect what I am trying to do?