Home Backend Development PHP Tutorial WordPress搬家方法及乱码的解决办法

WordPress搬家方法及乱码的解决办法

Jun 13, 2016 pm 12:57 PM
nbsp phpmyadmin unicode wordpress

WordPress搬家方法及乱码的解决方法
前段时间,我的博客备案就被取消了,由于平时比较忙,也没有去管。突然有一天空间商那边显示备案审查,让我重新备案,我才意识到终于要搬空间了。提交工单让空间商备份数据,自己下载了就没管了,今天刚好有空,所以搞了个国外空间把博客搬到了国外了。
搬家的过程非常简单,只需要三步:
1、在原空间打包备份好程序和数据库,让人狗血的是空间商直接复制打包了MYsql的数据库文件,并非导出的.sql文件,无奈只能自己重新手动去导出数据库了(这里有点杯具,后面说)
2、在新空间绑定已解析好的域名,将程序上传上去并解压到空间根目录下。登陆空间数据库管理,将备份好的数据库通过phpmyadmin导入。
3、用editpuls打开根目录下的wp-config.php,修改里面的数据库配置信息:数据库名、数据库密码。
搬家就完成了。
这里说一个狗血的事,我完成了上面的搬家步骤后,打开一看,内容全乱码的。我就知道编码出了问题,初步估计是PHPMYADMIN导出导入时编码不一致造成的。
原空间的phpmyadmin是老版本的,貌似是2.9的,而新空间则是新版的,导出前没有在原空间的phpmyadmin里将编码整理一下,所以出现了乱码的情况。
具体操作步骤为:登陆原空间的phpmyadmin,登陆后在右上角一个【操作】按钮,点击该按钮拉到最下面,你会看到一个整理,这里有一个下拉框,将编码拉到最下面,即:utf8_unicode_ci,点击旁边的执行,然后再去导出数据库,重新导入到新空间的数据库里,刷新,乱码不见了。
 
 
------解决方案--------------------
这么简单啊 

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP vs. Flutter: The best choice for mobile development PHP vs. Flutter: The best choice for mobile development May 06, 2024 pm 10:45 PM

PHP and Flutter are popular technologies for mobile development. Flutter excels in cross-platform capabilities, performance and user interface, and is suitable for applications that require high performance, cross-platform and customized UI. PHP is suitable for server-side applications with lower performance and not cross-platform.

What should I do if navicat cannot connect? What should I do if navicat cannot connect? Apr 23, 2024 am 10:00 AM

When Navicat cannot connect, you can try the following solutions in order: Check whether the connection information is correct, such as database name, host name, port number, user name and password. Make sure the database is up and running. Check the firewall rules to confirm that Navicat and related services are not blocked. Try using the ping command to test your network connection. Update Navicat client software to the latest version. Check the server logs for error messages related to failed connections. Try connecting using other database tools to troubleshoot Navicat-specific issues.

How to change the default password of Empire CMS How to change the default password of Empire CMS Apr 16, 2024 pm 03:21 PM

Reset the Empire CMS default password through the following steps: Log in to the database and find the user table. Edit the administrator user (username is admin). Modify the value in the password field. Save the changes and use the new password to log in to the management backend.

In which folder are wordpress articles located? In which folder are wordpress articles located? Apr 16, 2024 am 10:29 AM

WordPress posts are stored in the /wp-content/uploads folder. This folder uses subfolders to categorize different types of uploads, including articles organized by year, month, and article ID. Article files are stored in plain text format (.txt), and the filename usually includes its ID and title.

Where is the wordpress template file? Where is the wordpress template file? Apr 16, 2024 am 11:00 AM

WordPress template files are located in the /wp-content/themes/[theme name]/ directory. They are used to determine the appearance and functionality of the website, including header (header.php), footer (footer.php), main template (index.php), single article (single.php), page (page.php), Archive (archive.php), category (category.php), tag (tag.php), search (search.php) and 404 error page (404.php). By editing and modifying these files, you can customize the appearance of your WordPress website

How to check if navicat forgets root password How to check if navicat forgets root password Apr 24, 2024 am 12:06 AM

Answer: You can view and recover a forgotten Navicat root password by modifying the MySQL configuration file. Stop the Navicat MySQL service. Modify the MySQL configuration file, remove the "#" symbol before the password line and enter the root password. Save and restart the MySQL service.

Which version of wordpress is stable? Which version of wordpress is stable? Apr 16, 2024 am 10:54 AM

The most stable WordPress version is the latest version because it contains the latest security patches, performance enhancements, and introduces new features and improvements. In order to update to the latest version, log into your WordPress dashboard, go to the Updates page and click Update Now.

Does wordpress need to be registered? Does wordpress need to be registered? Apr 16, 2024 pm 12:07 PM

WordPress requires registration. According to my country's "Internet Security Management Measures", websites that provide Internet information services within the country must register with the local provincial Internet Information Office, including WordPress. The registration process includes steps such as selecting a service provider, preparing information, submitting an application, reviewing and publishing, and obtaining a registration number. The benefits of filing include legal compliance, improving credibility, meeting access requirements, ensuring normal access, etc. The filing information must be true and valid, and must be updated regularly after filing.

See all articles