How to change WordPress installed blog path?
I have installed my WordPress blog site here, http://www.test.com.au/demo, now I want to change my root path to this http://www.test.com.au, but when I transfer all files to here, I can't really access the site correctly.
I don't know what is actual method to do this.开发者_运维百科
You may need to do more than just transfer files. You will need to change a few database settings as well in wp_options. Do a select * from wp_options and see which settings are still pointing to your old location, then you can change those.
- Put it back into demo
- go to demo/wp-admin
- change settings -- wordpress address to http://www.test.com.au
- change settings -- site url to http://www.test.com.au
- save settings
- move files to root
Refer this
http://codex.wordpress.org/Moving_WordPress
Here are the steps to move your site.
I would follow @davidosomething's list above.
In the future, I would try this.
- Install the site in a permanent directory like "admin".
- Test the site and get it setup the way you like.
- When you are ready to go live, go into the admin settings area.
- Keep wordpress address the same, and remove "admin" from site url.
- Then copy your .htaccess file and index.php file into the root.
Open up copied index.php file, and delete "admin" from last line:
require('./admin/wp-blog-header.php');
精彩评论