How to Change WordPress URL Without Moving or Reinstalling

0034

Courtesy of the folks at TechBasedTraining

Imagine you installed WordPress on a folder named ‘blog’ and you like it so much you want to use it as your main website. Meaning, you want anyone going to yoursite.com to land on the WordPress site. It is actually super easy to do and you don’t have to re-install or manually move the whole installation. This checklist walks you through the steps you need to take.

1. Prepare The Index File

  • Download or copy the original index.php from WordPress onto your computer. If you want you can temporarily re-name it to wpindex.php.
  • Open the file and edit the line that says require(‘…’), make sure this points to the right place. In this
    example, WordPress is installed in /public_html/blog so you’ll want to make it require (‘blog/wp-
    blog-header.php’).
  • If you installed WordPress in a folder with another name you will need to adjust the path accordingly.
  • Save this file.
  • Upload it to your /public_html/ or /www/ folder.

2. Log In To WordPress Admin

  • Navigate to Settings >> General .
  • One of the options there are WordPress Address and Blog Address.
  • Change the Blog Address from http://www.yoursite.com/blog to http://www.yoursite.com .
  • Do not change the WordPress Address.
  • Save.

3. Rename The Index

  • Log in to your site via FTP or your web hosts’ file manager.
  • Rename your existing index.html/index.php etc – whatever your home page is to another name – this will take your home page down.
  • Rename wpindex.php (the file we edited and uploaded earlier) to index.php .

4. Visit Your Website In A Browser

  • Refresh so you will see the changes. If you don’t see it on the first refresh, try a couple of refreshes or clear your browser cache then visit your site again.
  • Your home page should now be the WordPress home page.

Tip #1:

You can use this same method to work in private mode. For example, if you have a live site and do not want to interfere with it, you can install it into a special folder and switch using the above steps when you’re ready.

Tip #2:

You can also do this in reverse. For example, install WordPress in /public_html/ or /www/ folder then make it appear in /blog/ or /whateverfoldername/. Just follow the same steps.

Want More?

If you found this checklist helpful, there’s a lot more where it came from at TechBasedTraining. They also provide technical training with special focus on Internet Marketing related tasks. Perfect for Virtual Assistants who want to upgrade their skills and Internet Marketers who would rather save time by letting the experts train their team.
Oh and feel free to pass it on to those you feel will benefit from it. Go ahead, you have our permission.

 

1 Comment

  • Jeff Wilschut

    Reply Reply February 28, 2016

    Hi Terence,

    I appreciate you sharing the information within this post. I will have to take a closer look at it and the source link you provided for further tech based information.

    So much to learn and implement into building an online business. It is wise to source out valuable information from knowledgeable people such as yourself and others at P2S that helps make the tasks easier.

Leave A Response

* Denotes Required Field