Last update at :2024-06-20,Edit by888u
Many users are like snails and like to buy a cheap VPS when they see it. Regardless of monthly payment or annual payment, I still have more than a dozen VPS hosts, large and small. They feel that it doesn't matter when they buy it, but they may feel distressed when renewing. . Some VPS hosts do not have any important websites built at all, and may just use an idle domain name to build a wordpress program.
Today, when I was dealing with moving a WordPress website, I recorded the process of moving this commonly used CMS website and some precautions. It should be of some use to some webmasters. After all, we still use the WordPress program a lot in our blogs and personal websites. of. What should we do if we prepare to move the website?
Step one, backup WordPress website files and database
Whether we use the original domain name to back up and move, or we have a new domain name and use the existing old website data, what we all need to deal with is the backup of website files, including the database. If the data is relatively small, Snail personally prefers to back up the files separately. Use PHPMYADMIN to export the database as .sql.gz. If the data is relatively small, this method is more direct and simple. If the database is large, I personally recommend using Imperial Backup King to back up the database, which is less prone to errors.
Step 2, create a new site and restore backup data
We need to add the site domain name to the new space. It is recommended not to parse it for the time being and wait until the data is restored before parsing the IP. When copying the backed up website files to the new space directory and importing the database, you need to pay attention to changing the database connection of the wp-config.php file to a new MYSQL database connection.
If our moving website needs to change the domain name, then we need to modify the two URLs in the WP_OPTIONS data table in the WORDPRESS database to the new website address. At this time, we need to resolve the new IP address. After successful resolution, log in to the background, reset the fixed connection, and check whether the pseudo-static is complete.
The third step is to solve the problem of batch characters in wordpress content
If we change the URL when moving the data, the original website content may still contain the original website address information. If we rely on manual replacement one by one, it will definitely be tiring. We need to use MYSQL batch replacement.
update wp_posts set post_content=REPLACE(post_content,\\"Old content\\",\\"Replace with new content\\")
Note: The corresponding data table field needs to be your own. The default value is wp_. If you customize it, change it to your own.
Step 4: Replacement of weights of new and old wordpress domain names/sites
If we are moving the original domain name to a new space, we only need to keep the original old space accessible for at least half a month to ensure that search engine spiders have access, and then judge that we have changed to a new space.
If we want to change the domain name of the moving website, we need to make a 301 jump for the HTACCESS file of the old website. You can refer to \\"Apache environment.htaccess pseudo-static 301 jump\\" 301 jump for the whole site to make the transition. For weight, it is necessary to ensure that the old domain name is accessible for at least 3-6 months, so that the weight of the original old domain name is not completely lost.
Step 5: Update frequency of new WORDPRESS website
After moving the data, we need to keep the new website/space site updated, as well as appropriate external connections. This can guide users and search engines to know that the website has changed the space/domain name, ensuring the transmission of data and weight.
To summarize, in this 5-step process, you can quickly move your WordPress website. It usually takes 1-3 months to stabilize the new website and space.
Recommended site searches: registered domain name rental, Chinese domain name registration, Ministry of Industry and Information Technology website registration inquiry, registration-free virtual host, cheap virtual host overseas server, proxy IP, virtual host space, domain name registration, station group server rental,
发表评论