Link to home
Start Free TrialLog in
Avatar of iamdiggnified
iamdiggnified

asked on

Moving Wordpress into the Root folder

I read online that its very important to install Wordpress in the root directory of your web site. What steps must I take to move my current Wordpress folder up to the root directory and have everything working properly? Currently the index page of my wordpress site is located two folders deep from the root directory.

Lastly, the main page of my site is named index.php in my root directory. The main page of my wordpress blog is named "index.php". If i moved my wordpress blog to the root directory my blog index.php would overwrite the main index.php file which i do not want. Do I have to rename my wordress blog named index.php before I move everything to the root directory?
Avatar of jsvor
jsvor

You don't need to have wordpress in the root folder.  View the following article from Wordpress stating how to give Wordpress its own directory. http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
ASKER CERTIFIED SOLUTION
Avatar of Randy Downs
Randy Downs
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
There isn't any need to put WordPress in the Root directory. The reason it is suggested is when you use a theme that has images with the template they sometimes use the URL of the image like this: /images/whatever.jpg. If WordPress isn't in the root then the image path wouldn't work. This has been fixed by simply adding the php bloginfo('template_directory'); to assure the images are found. The other reason is most people don't want their websites to have another folder in the URL name like this: http://yourwebsite.com/subfolder/home, when it could be simply: http://yourwebsite.com/home. This is fixed by adding this to your .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Open in new window


So if everything is working fine, no need to move it.