Last update at :2024-06-19,Edit by888u
Since we choose to build a website, whether it is a personal website for learning or a profitable website hoping to achieve great success in business operations, from choosing a host and server to selecting programs, themes, and plug-ins. We are struggling all the time. For example, if you move your website to this server today, you will see that this server is cheap and move it there again tomorrow. Snail believes this is what many friends are doing.
Of course, through various choices and relocations, we may learn about many service providers and various program experiences. I met this friend today. After getting a cheap Alibaba Cloud host (virtual host) plan, he wanted to move the WordPress website, but various errors occurred when importing the database. Don't think it must be a database version incompatibility problem.
First, check whether the database is complete
1. Re-export and verify
After Snail got his database, an error occurred after importing it. Although I knew it might be an encoding and version problem, in order to ensure completeness, I re-imported the database from the host provider where his original website was located.
2. Import your own environment for testing
I first imported it into my temporary test website environment. What I imported here is the VPS WEB environment. There is no problem in directly using the mysql command to import. I can verify that the database should be completely imported, otherwise an error will be reported. .
Second, import the Alibaba Cloud host database
This friend is not using an ECS server, but a virtual host (it seemed to be called Wanwang host in the past). Let’s try importing it first.
Alibaba Cloud Virtual Host provides an import tool in the backend. When importing, I saw a \\"utf8mb4_unicode_ci\\" error as expected. This problem is solved in \\"WordPress import database\\"Unknown collation: \\'utf8mb4_unicode_ci \\"Error\\" has been recorded. At that time, the solution was to use the selected version of the export database, but after using it this time, I found that it did not work.
What is used is to open the database sql file with a text editor and replace all \\"utf8mb4_unicode_ci\\" with \\"utf8_general_ci\\". Then I continued to import, but an error was reported again. This time, the error "CHARSET=utf8mb4\\" appears. Then replace "CHARSET=utf8mb4\\" with "CHARSET=utf8\\". Then try importing it again.
That's it, problem solved. Then modify the website database connection file and you're done.
Recommended site search: free domain name, domain name price, registration query, foreign vps server rental, Wanwang domain name space, foreign free website server, independent IP host, how to query the domain name registration number, mainland China station group server, website registration System,
发表评论