Call: (209) 560-6611

Redirect domain to new WordPress install

Date: January 13, 2015 Author: ang Category: Tutorials WordPress Comments: 0

Follow the instructions below to point a domain name to a different directory. In this example I will point my domain from an old WordPress website installed in the root folder to a new WordPress  website installed in a different directory.

Modify the .htaccess file

  1. Locate the .htaccess file located in the root directory of your hosting account using an ftp program or file management cPanel application.
  2. Move the .htaccess file onto your local hard drive.
  3. Open a text editing program (Notepad).
  4. Click on the 'New' options and set the filetype field to 'All Files (*,*)'.
  5. Navigate to the .htaccess file on your local computer and open it in the text editor program.
  6. At the end of the text, after 'END WordPress', add the following line of apache code:

    RewriteEngine On

    RewriteCond %{HTTP_HOST} ^(www.)?mywebsite.com$

    RewriteRule ^(/)?$ foldername [L]

    Note: The red text needs to be changed to match your own setting. The word 'mywebsite.com' needs to be changed to your domain name. The word 'foldername' needs to be the name of your folder with the new WordPress install.

  7.  Save the file using 'ctrl-s' command. If you need to save the file using the 'save as' option, just make sure you don't save it as a '.txt' file. In other words, to save your .htaccess file as a '.htaccess' file, make sure you have the 'Save as type:' set to 'All Files (*,*)'.

Leave a Reply

Your email address will not be published. Required fields are marked *

Before you post, please prove you are sentient.

what is 2 in addition to 5?

Before you post, please prove you are sentient.

What is 9 multiplied by 2?