I installed WordPress in the subdiretory /de
and activated multisite features. The main blog has the URL/path: mysite.de/de
Now I want to add a second site for the English language with the following url: mysite.de/en
But after I added the site, the subdirectory for the English site was set as:
mysite.de/de/en
Any ideas how I can get these site urls?
mysite.de/de
mysite.de/en
mysite.de/fr
Here’s a proper multisite solution:
Install WordPress directly on the root of your domain
mysite.de
. After that, setup a multisite and chose the subdomain option (Yes, subdomain! It’s far more flexible and you can use it with subdirectories as well).WordPress will ask you to update
wp-config.php
and.htaccess
. To thewp-config.php
add the following constants (in addition to the one provided by WP)Don’t use the .htaccess code provided by WordPress but use instead this one:
Go to the network admin menu and create two sites, one for each language. You will get asked for the site address (subdomain). Just enter
de
for the German site anden
for the English one. After the site has been created, edit it directly. Now you can edit the complete URL. Just set it tohttp://mysite.de/de
andhttp://mysite.de/en
. Do this for the French site as well.Now you have four sites in your network, probably with the following IDs:
As you don’t need the first one, you can leave it just empty. You just don’t use it. Manage your content in the other thre sites.
To redirect requests to
mysite.de/
add another line to your.htaccess
above the others:You now have a full functional network of two active sites for your content.
Finally a personal recommendation: There’s a free plugin called Multilingual Press that supports this concept of a multilingual setup in a network. Disclosure: I contributed to this plugin before and working for a company that develops this plugin.
It would be far easier to maintain the blog by using a good WordPress translation plugin.
WPML (http://wpml.org) is my favourite plugin for the task. If you prefer not to pay anything QTranslate is also a good option.
Both plugins allow you to have sub domains (en.mysite.de) or language folders (mysite.de/en).
Best of luck!