Remove Domain Part, WordPress-plugin
If you have your WordPress multisite installed on a subdomain like wp.example.com, this plugin removes the wp. part from new subdomain sites.
Before plugin
site1.wp.example.com
site2.wp.example.com
After plugin
site1.example.com
site2.example.com
It only makes sense for WordPress Multisite installations (former WordPress MU).
Download version 1.2 here:
http://tech.velmont.net/wp-content/plugins/remove_domain_part.txt
How to actually use this?
You probably want to follow my guide Howto use subdomain WordPress Multisite 3.x (3.0 and 3.1) without dashboard site?…
If you’re in a hurry, in short:
- Install plugin
- If your dashboard (hub page) isn’t called
wp.example.com, you have to changeREMOVE_DOMAIN_PARTin the plugin to what you use. E.g.define('REMOVE_DOMAIN_PART', '.mydashboard.');(the dots are important). - Network activate it
However, you probably want this plugin with a few others to have a good setup. So read the howto.
Changelog
1.2
This release handles frontend signups.
- You have to Network active the plugin now, because it needs to run on the blog sites when they get activated.
- It will rewrite activation emails, removing any instances of
REMOVE_DOMAIN_PARTthat it can find. - It will now also rewrite the blog URL upon activation
1.1
Support the more picky PHP setups. Fixes some errors and warnings.
1.0
Initial version.
i get this error when i activate the plugin and try to create a new site. please help.
Warning: Missing argument 2 for remove_domain_part() in /home8/donmedpo/public_html/multisite/wpm/wp-content/plugins/removedomainpart.php on line 17
Warning: Missing argument 3 for remove_domain_part() in /home8/donmedpo/public_html/multisite/wpm/wp-content/plugins/removedomainpart.php on line 17
Warning: Missing argument 4 for remove_domain_part() in /home8/donmedpo/public_html/multisite/wpm/wp-content/plugins/removedomainpart.php on line 17
Warning: Missing argument 5 for remove_domain_part() in /home8/donmedpo/public_html/multisite/wpm/wp-content/plugins/removedomainpart.php on line 17
Warning: Missing argument 6 for remove_domain_part() in /home8/donmedpo/public_html/multisite/wpm/wp-content/plugins/removedomainpart.php on line 17
Warning: Cannot modify header information – headers already sent by (output started at /home8/donmedpo/public_html/multisite/wpm/wp-content/plugins/removedomainpart.php:17) in /home8/donmedpo/public_html/multisite/wpm/wp-includes/pluggable.php on line 897
Pierre
26 Jun 11 at 14:47
That doesn’t make any sense.
I could code around that, but all the arguments should be there, because the hook is only called in one place.
I need to know what version you’re running. The error code doesn’t really make any sense, as I’ve looked at the source code for both WP 3.0 and 3.1, and they both call the hook in the same way. :-)
I’ll look at it.
Odin Omdal Hørthe
26 Jun 11 at 15:56
Hello,
I can’t install the plugin, I get the followintg error:
Plugin could not be activated because it triggered a fatal error.
Parse error: syntax error, unexpected T_STRING in /home/teshir1/public_html/help/wp-content/plugins/remove_domain_part.php on line 42
Using WP 3.1.3
Any fix on this?
Thanks
Teshir
28 Jun 11 at 8:05
Teshir: Whoa there! I’m actually working directly on the plugin for version 1.2, trying to fix Pierre’s problem.
I didn’t know the plugin was so popular that someone would try to download it in the middle of my debugging!
So it is just a race condition, you downloaded the file when I had made some partway changes, and not the full ones.
Odin Omdal Hørthe
28 Jun 11 at 8:12
Is there a full version coming out soon?
Once I test this and verify it works, I will send it to my list of WP users, its a modest list of 800 people, but most of them need this kind of fix.
Hopefully you can help, I know you’re doing this for free and out of your spare time, but I’m sure many of us would be up to buying you a beer for a complete plugin that can take care of this.
Best,
Teshir
Teshir
28 Jun 11 at 8:40
Teshir: If you could hard-refresh the plugin page now, and try it. It should work now.
However, do mind that I have changed the howto; because Remove Domain Part 1.2 needs to be Network Activated to get full functionality.
It passed all my tests now.
Odin Omdal Hørthe
28 Jun 11 at 8:42
Hello,
Thanks for the quick reply.
I was able to install it, and enable it via Network Enable.
However, I can’t get it to change the names.
I may be missing a point here.
I have WP with network enabled, have the plugin network installed, but when I go to the “hub” website the plugin does not show up.
Any thoughts?
Teshir
28 Jun 11 at 8:54
Teshir: What is your dashboard site? Is it called
wp.yourdomain.com? If it ISN’T, you have to changeREMOVE_DOMAIN_PARTin the plugin from.wp.to what you use.Say you use
mydashboard.mydomain.comas your dashboard/main site; then you need to changeREMOVE_DOMAIN_PARTin the plugin to.mydashboard., mark the dots are important.The plugins that are network activated doesn’t normally show up as plugins on individual sites, but it should still be active there.
Odin Omdal Hørthe
28 Jun 11 at 9:02
Hello,
Thanks for the update.
I have actually set it up the way you say.
In my case, my “main dashboard” is: help.domain.com
so I changed it to: .help.
However, I think I know why, and dumb me!
ServerAlias is not yet configured properly. I am now looking into re-doing the entire thing and then trying the plugin.
I will update you with my progress tomorrow, as it is 2 AM now and I think a fresh set of eyes will be best.
Thank you for all your kind help. I will for sure get back here with the results.
Best,
Teshir
Teshir
28 Jun 11 at 9:08