How to change site URL for WordPress? Or How to change WordPress blog URL in WordPress?
We have a very easy steps for you to move your WordPress blog from root/ or public_html/ to root/blog or public_html/blog where the WordPress link will be changed from www.domainwordpress.com to www.domainwordpress.com/blog
Log into your WordPress ‘general’ settings page at:
Chage WordPress address (URL)as: www.domainwordpress.com/blog
Change Site address (URL)as:www.domainwordpress.com
Click on ‘Save Changes’. You get Page Not Found error, don’t worry.
Now, log into the FileManager or FTP or SSH.
You have all the files in your root directory. So, create a new directory/folder using FTP or SSH mkdir(ex:blog). Then move all the files instead index.php and .htaccess (move to blog dir). Now, copy the index.php and .htaccess to /blog directory. That means, you have copy of index.php as well as .htaccess in root/ as well as /blog.
Now, edit the root/index.php as:
require(‘./wp-blog-header.php’); to require(‘./blog/wp-blog-header.php’); and then save the index.php.
Your blog has been moved to sub directory and you can log into your WordPress at:
Make changes in .htaccess in blog/.htaccess as well as root/.htaccess.