How to Install WordPress on Subdomain

Filed under: by: Rumburak

I've spend some time fighting to install Wordpress on a subdomain.
Every step was easy, jet pulled together didn't work.
Finally I 've seen the option in Wordpress settings.
Now the steps to remember.

1. create a subdomain.
2. create domain/subdomain/ folder.
3. install Wordpress on domain/subdomain/ folder.

Some of the steps are not necessary , on some hosts when you create subdomain it creates a folder automatically.
Also you can try to install Wordpress first, and then create subdomain that points to existing WP installation folder.


4. In WP Admin panel >> settings change the option
WP address (URL) from
http://domain.com/subdomain/
to
http://subdomain.domain.com
and the same with the second
Blog address ( URL ) to
http://subdomain.domain.com
now it should work.

I also put here the entry to htaccess file, however this time
I didn't use it.
Solution below allows you to create only the subfolder, and the subdomain settings are in htaccess
in this case subdomain URL is cracovia.e-guia.info .

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
Rewrite Rule for cracovia.e-guia.info
RewriteCond %{HTTP_HOST} cracovia.e-guia.info$
RewriteCond %{REQUEST_URI} !cracovia/
RewriteRule ^(.*)$ cracovia/$1

----------
Edit
it was however necessary to put htaccess file in /cracovia/ directory
to get redirection www.e-guia.info/cracovia/ --> cracovia.e-guia.info

RewriteEngine on
RewriteCond %{HTTP_HOST} !^cracovia\. [nc]
RewriteRule ^(.*)$ http://cracovia.e-guia.info/$1 [L,R=301]

2 comments:

On 10 November 2008 at 08:07 , Anonymous said...

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.yourwebsite.com
RewriteCond %{HTTP_HOST} ([^.]+)\.yourwebsite.com
RewriteRule ^(.*)$ /path_to_your_site/httpdocs/work_out.php?url=%1


Regards,
Member of Jombro.com

 
On 13 November 2008 at 17:16 , Keym4k3r said...

Thank you, Neo.