{"id":8841,"date":"2015-01-13T22:39:37","date_gmt":"2015-01-13T22:39:37","guid":{"rendered":"http:\/\/2slick.com\/web\/?p=8841"},"modified":"2015-01-13T22:44:03","modified_gmt":"2015-01-13T22:44:03","slug":"redirect-domain-to-new-wordpress-install","status":"publish","type":"post","link":"https:\/\/2slick.com\/web\/redirect-domain-to-new-wordpress-install\/affordablewebsitestips\/tutorials","title":{"rendered":"Redirect domain to new WordPress install"},"content":{"rendered":"<p>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 &nbsp;website installed in a different directory.<\/p>\n<h3>Modify the .htaccess file<\/h3>\n<ol>\n<li>Locate the .htaccess file located in the root directory of your hosting account using an ftp program or file management cPanel application.<a href=\"http:\/\/2slick.com\/web\/wp-content\/uploads\/2015\/01\/htaccess.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8842\" style=\"border: 1px solid black;\" title=\"htaccess\" src=\"http:\/\/2slick.com\/web\/wp-content\/uploads\/2015\/01\/htaccess.jpg\" alt=\"\" width=\"210\" height=\"231\" \/><\/a><\/li>\n<li>Move the .htaccess file onto your local hard drive.<\/li>\n<li>Open a text editing program (Notepad).<\/li>\n<li>Click on the 'New' options and set the filetype field to 'All Files (*,*)'.<a href=\"http:\/\/2slick.com\/web\/wp-content\/uploads\/2015\/01\/all_files.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8843\" style=\"border: 1px solid black;\" title=\"all_files\" src=\"http:\/\/2slick.com\/web\/wp-content\/uploads\/2015\/01\/all_files.jpg\" alt=\"\" width=\"526\" height=\"142\" srcset=\"https:\/\/2slick.com\/web\/wp-content\/uploads\/2015\/01\/all_files.jpg 526w, https:\/\/2slick.com\/web\/wp-content\/uploads\/2015\/01\/all_files-300x80.jpg 300w\" sizes=\"auto, (max-width: 526px) 100vw, 526px\" \/><\/a><\/li>\n<li>Navigate to the .htaccess file on your local computer and open it in the text editor program.<\/li>\n<li>At the end of the text, after 'END WordPress', add the following line of apache code:\n<div style=\"background-color: #efefef;\">\n<p>RewriteEngine On<\/p>\n<p>RewriteCond %{HTTP_HOST} ^(www.)?<span style=\"color: red;\">mywebsite.com<\/span>$<\/p>\n<p>RewriteRule ^(\/)?$ <span style=\"color: red;\">foldername<\/span> [L]<\/p>\n<\/div>\n<p><strong>Note:<\/strong>&nbsp;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.<\/li>\n<li>&nbsp;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 (*,*)'.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>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 &nbsp;website installed in a different directory. Modify the .htaccess file Locate the .htaccess file located in the root directory of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8139,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,6],"tags":[],"class_list":["post-8841","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-wordpress"],"_links":{"self":[{"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/posts\/8841","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/comments?post=8841"}],"version-history":[{"count":4,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/posts\/8841\/revisions"}],"predecessor-version":[{"id":8846,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/posts\/8841\/revisions\/8846"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/media\/8139"}],"wp:attachment":[{"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/media?parent=8841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/categories?post=8841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/tags?post=8841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}