1. How do I safely and properly change the WP install location from /blog to root /?
I would leave things right where they are and instead just use this to simply redirect your domain to WP:
## source: https://my.bluehost.com/cgi/help/347#redirect
# .htaccess main domain to subdirectory redirect
# Do not change this line.
RewriteEngine on
# Change example.com to be your main domain.
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteCond %{REQUEST_URI} !^/subdirectory/
# Don't change the following two lines.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteRule ^(.*)$ /subdirectory/$1
# Change example.com to be your main domain again.
# Change 'subdirectory' to be the directory you will use for your main domain
# followed by / then the main file for your site, index.php, index.html, etc.
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
# RewriteRule ^(/)?$ subdirectory/index.html [L]
## Use index.php for WordPress
RewriteRule ^(/)?$ subdirectory/index.php [L]
## Visitors to your Web site will not be able to tell that your main domain is using a subdirectory...
Edit: I think you will also need to temporarily use either of these (wp-config.php or theme functions.php) to update your WordPress database so it will drop the sub-folder from the path:
<?php
/**
* The base configurations of the WordPress.
*
* @package WordPress
*/
/*-either-*/
/** @ root/wp-config.php: /*toggle on/off*
define('WP_HOME','http://domain.com');
define('WP_SITEURL','http://domain.com');
/*-or-*/
/** @ root/wp-config.php: /*toggle on/off*
define('WP_HOME','http://www.domain.com');
define('WP_SITEURL','http://www.domain.com');
/*-end-*/
<?php
/*-either-*/
/* @ theme/functions.php /*toggle on/off*
update_option('siteurl','http://domain.com');
update_option('home','http://domain.com');
/*-or-*/
/* @ theme/functions.php /*toggle on/off*
update_option('siteurl','http://www.domain.com');
update_option('home','http://www.domain.com');
/*-end-*/
2. Because of the 2 different platforms and obvious massive link changes, how do I avoid SEO mishaps and properly set up redirects for all old links at domain.com to domain.com (same domain, but after WP replaces the vBulletin)?
I do not think the above covers that, but I believe you can find that answer here and then just add it to the above .htaccess:
http://www.internetmarketingninjas.com/blog/search-engine-optimization/301-redirects/
Thread Starter
Chad
(@chadi)
Thanks but I prefer to move the site to the root folder without the need to have a custom htaccess just for redircts, etc. It will cause problems down the road, especially various plugins like Yoast SEO, etc. Anyway, I like things kept organized and clean.
custom htaccess just for redirects, etc. It will cause problems down the road, especially various plugins like Yoast SEO, etc.
Nope, no trouble down the road at all. What I had mentioned would be something much different than a typical redirection. Rather, it simply tells your domain to skip to the next folder with nothing being changed anywhere and where WordPress is expecting it to arrive without any redirection needed even after it arrives. If you were dealing with an Add-On Domain, what I have mentioned is the very same thing that would be done at cPanel to make it go directly to a destination folder without that folder ever being part of its path. But where certain hosts require that a Primary Domain be assigned to “root”, the above does for it what cPanel can do for an Add-On.
Anyway, I like things kept organized and clean.
Understood, and I had first employed the above for that very same reason after adding an Add-On Domain and not wanting its folder inside “root” alongside all the folders and files for my primary installation. In your case, the above would make it possible for you to do anything you wish within your “root” folder with no possibility of any mixup or confusion with WordPress folders and files being there also. However, I am not trying to persuade, just wanting to be sure the above does not get misunderstood or mis-represented! 😉
Thread Starter
Chad
(@chadi)
Thanks for the clarification. I’d rather do it as clean and simplified as possible. Don’t get me wrong, I’m sure your method is fine but I just like things clean and cut.
Anyone try the official method, especially on 4.1?
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory