migration - Transfer WP from subdomain to main domain

I've set up a redesign of a site in the subdomain to work out any kinks and to make sure everythings working ok bef

I've set up a redesign of a site in the subdomain to work out any kinks and to make sure everythings working ok before setting it up on the root domain. I've looked up transfers but have only found info on transfering from host to host or from local to host.

I've set up a wordpress site that was previously locally hosted, so I know how to transfer a site, I'm just hoping that there is an easier way to do this since this is transferring from subdomain to domain - like hopefully without having to reinstall wordpress...

Any solutions or suggestions welcome.

Thanks in advance.

I've set up a redesign of a site in the subdomain to work out any kinks and to make sure everythings working ok before setting it up on the root domain. I've looked up transfers but have only found info on transfering from host to host or from local to host.

I've set up a wordpress site that was previously locally hosted, so I know how to transfer a site, I'm just hoping that there is an easier way to do this since this is transferring from subdomain to domain - like hopefully without having to reinstall wordpress...

Any solutions or suggestions welcome.

Thanks in advance.

Share Improve this question asked Feb 28, 2011 at 17:54 user3498user3498 1
  • 1 If it's just a redesign, why not just copy the theme from the subdomain to the main domain? – Andy Commented Mar 30, 2011 at 19:46
Add a comment  | 

2 Answers 2

Reset to default 1

After copying to the main-directory change the values in then wp-config.php and .htaccess files for the new localtion. Then you have to change the values in the database. You need 3 SQL-Statements, which you can execute with phpMyAdmin for example.

First change the options-Table

UPDATE wp_options
SET option_value = replace(option_value, 'http://www.example/subdir', 'http://www.example')
WHERE option_name = 'home' OR option_name = 'siteurl';

Second change the values for the guid in the posts-table

UPDATE wp_posts
SET guid = replace(guid, 'http://www.example/subdir', 'http://www.example');

Third change the URL in the posts-Table

UPDATE wp_posts
SET post_content = replace(post_content, 'http://www.example/subdir', 'http://www.example');

If you have used another prefix then wp_ you have to change it in the 3 SQL-Statements. Pay attention at the example domain-names, too.

wordpress-support-moving-wordpress helped me, on a virtual machine running ubuntu, use the from existing server., i used the velvet plugin for url updating/re-write and seems to work maybe 1 or 2 broken images or attachments but it done 99% of the work.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742367649a4430633.html

相关推荐

  • migration - Transfer WP from subdomain to main domain

    I've set up a redesign of a site in the subdomain to work out any kinks and to make sure everythings working ok bef

    3小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信