Moving WordPress on Bluehost

I’ve been playing around with a new installation of WordPress on bluehost for about a month now. I originally created a wordpress folder, but now I’d like to try moving wordpress to the root area of my site. I googled a bit, but didn’t find much information on how move a wordpress install on Bluehost, so I thought I would document the process. Here goes…


Edit WordPress Settings

Wordpress Settings, Site AddressFrom your WordPress dashboard open Settings section and go to the General area. Locate the Site Address (URL) section and change this to the new URL that you’d like to use. In my case I’m moving the site to root website, so I’ll just remove ‘/wordpress’.


Next you need to copy two files from your wordpress install folder to the new location. These files tell the web server where to find your wordpress files. On Bluehost this can be accomplished a couple of ways. If you’re familiar using SSH you can use the command line to copy the files. If the previous sentence sounds like Greek to you, using the Bluehost Web Disk utility to copy the files may be easier, so I’ll show that method here.


Bluehost Web Disk

The Web Disk utility allows you to remotely mount your servers disk as though it were a local drive on your computer. I’ve used this option in Windows XP, 7, and 10 without problems and the docs state it should also work for Mac. If you don’t already have a Web Disk link set up on your then log into your Bluehost Cpanel site and go to Bluehost Web Diskthe Files area.

Click on the Web Disk icon. You may be prompted to create a username and designate the folder you want access to, I’ve chosen to mount the root (‘/’) folder. Download the appropriate link for your operating system and double click to open the connection. If you have trouble you can refer to this site. Please be sure to use a strong password, I’d also recommend deleting the Web Disk access once you are done using it. The best way to avoid security holes on your site is to remove the access points. It only takes a minute to create the Web Disk the next time you need it.

Backing up the .htaccess file

Copy The Required Files

Once you have the Web Disk created, you’ll need to copy two files from your current install to the new location. Just in case something goes wrong, it’s a good idea to create backups of the files we’re going to overwrite before you proceed. In the new location locate the .htaccess and index.php file. The .htaccess file is a hidden file, so you may need to set your computer to show hidden files. You can then easily find the file by sorting files by ‘File Type’ and then looking for ‘HTACCESS File’. From windows it will look like this file has no name, that’s the file you want. Simply right click on this file, select properties, and then in the General tab give the file a new name.  Follow the same procedure for the index.php file. Look for a file named ‘index’ and a file type of PHP and change the name of that file.

Now click on the Web Disk icon on your desktop to open a second connection and navigate to the folder where your wordpress install currently resides. For me that is the /wordpress/folder. Locate the files you need to copy, right click and select copy. Then go to the other folder you have open (the one where you want the site moved to), right click and select paste. You should see a short dialog come up showing the file copy progress.


Edit The index.php File

The last step is updating your new home page so it knows where to find all your other wordpress files. This is done by editing the index.php file that you copied to the new location. Again, this can be done over SSH with your favorite editor, but I’m going to show how to do this with WebDisk and WordPad.

First, locate the new index.php file. Right click on the file and select Open with… and select WordPad. You may be prompted to use Notepad, I don’t recommend it. Notepad does not understand how to read the linebreaks in your php file, so it will look like you’re reading one long string of characters.

Locate the require line that loads your environment. It should look something like this:

/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . ‘/wordpress/wp-blog-header.php’ );

Change it to the new site location, for me that looks like:

require( dirname( __FILE__ . ‘/wp-blog-header.php’ );


Re-Start Your Browser To Test

Lastly, you should close your browser and re-open it to test your site. Even if you dump your cache, it may not work. I had this problem with Firefox, although I emptied the cache it was telling me that posts could not be found and I even received a ‘You do not have permission to preview drafts’ message once. Without getting too technical, it has to do with how we’ve moved things around and the browser is confused about where to look for what. So clear your cache, then close your browser and re-open it. If you’re still having difficulties then the top suspects are WordPress PermaLinks settings or .htaccess settings. Good Luck!

Feed Shark

Leave a Reply

Be the First to Comment!

Notify of