admin管理员组文章数量:1404337
I'm in the process of changing my web host. I'm wondering about the cleanest way to migrate my WordPress blog. I'm far from being a WordPress expert, I only use it to publish a few posts. Could you say me if my way to process is correct ?
- I downloaded all my website and blog content on my hard drive
- I exported a .sql of WordPress database restoration script from PHPMyAdmin
- I uploaded all my website and blog content on the new web host
- I executed the .sql script to create the same database
- I updated the wp-config.php WordPress file to update this section:
<?php
/**
* @package WordPress
*/
define('DB_NAME', 'THE_NAME_OF_DATABASE');
define('DB_USER', 'THE_DB_USER');
define('DB_PASSWORD', 'THE_DB_PASSWORD');
define('DB_HOST', 'THE_SQL_ADRESSE');
Currently , my WordPress seems running perfectly. Modules are correcly installed. The only parameter I can't say if it will work correctly is the wp-admin.php access. Indeed, as I transfere also my domain on the new web host, I am on a temporary cluster domain name so when I connect me to the administration panel, I am redirected to the real domain (old webhost). I will be fixed in several days.
I'm in the process of changing my web host. I'm wondering about the cleanest way to migrate my WordPress blog. I'm far from being a WordPress expert, I only use it to publish a few posts. Could you say me if my way to process is correct ?
- I downloaded all my website and blog content on my hard drive
- I exported a .sql of WordPress database restoration script from PHPMyAdmin
- I uploaded all my website and blog content on the new web host
- I executed the .sql script to create the same database
- I updated the wp-config.php WordPress file to update this section:
<?php
/**
* @package WordPress
*/
define('DB_NAME', 'THE_NAME_OF_DATABASE');
define('DB_USER', 'THE_DB_USER');
define('DB_PASSWORD', 'THE_DB_PASSWORD');
define('DB_HOST', 'THE_SQL_ADRESSE');
Currently , my WordPress seems running perfectly. Modules are correcly installed. The only parameter I can't say if it will work correctly is the wp-admin.php access. Indeed, as I transfere also my domain on the new web host, I am on a temporary cluster domain name so when I connect me to the administration panel, I am redirected to the real domain (old webhost). I will be fixed in several days.
Share Improve this question asked Jan 25, 2020 at 12:12 AnonymousAnonymous 1012 bronze badges 1 |2 Answers
Reset to default 1It would seem you have covered all your bases and your site is working as it should.
An additional step I have found useful is to verify hard coded paths within your exported SQL file because problems might not appear for weeks after the move.
I have moved a sites a few times and it seemed to be working fine, but after a few weeks I noticed some images were not appearing. My site had previously been http and I had moved to https for additional security. Some of the plugins used would save an image location into the database as http://example/wp-content/blahblah and that was incorrect.
If I ever move my site I always search the exported text, using a text editor, for http://example and replace with https://example. I also check if file paths have changed such as /doc/mydomain/public_html might because /var/sites/mydomain/public_html.
Having your site in text format gives you an opportunity to globally replace various things :)
That fixes any items hard coded by badly written plugins. It also takes care of the Wordpress Home & URL items as mentioned by D.Dimitrov in the comments.
I hope this helps you and others who might stumble across this.
My domain is now pointing the new web server host. All seems works perfectly. I can execute WordPress plugin update, my image appears... I precise that I don't change the domain name and my site was already in HTTPS. So to resume, this is the steps to migrate a WordPress :
- Download all my website and blog content on my hard drive
- Export a .sql of WordPress database restoration script from PHPMyAdmin
- Upload all my website and blog content on the new web host
- Execute the .sql script to create the same database
- Update the
wp-config.php
WordPress file to update the sectionDB_NAME, DB_USER, DB_PASSWORD, DB_HOST
本文标签: databaseIs my way to change WordPress server is correct
版权声明:本文标题:database - Is my way to change WordPress server is correct? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744799706a2625790.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
wp_options
table and search forsiteurl
andhome
option_name and change it to the new domain name. – AnTrakS Commented Jan 25, 2020 at 12:23