wordpress迁移以及遇到的一些问题[mysql备份导入导出][固定链接4
总的问题有两个,一是apache的配置,二是mysql的导出和导入。以及迁移后遇到的一些问题解决过程和方法。 A机器为老服务器,B为新服务器,A机器使用Appserv,B使用wmap,在配置多站点时候,遇到了一点儿不同。 除了都要打开httpd.conf Include conf/extra/htt
总的问题有两个,一是apache的配置,二是mysql的导出和导入。以及迁移后遇到的一些问题解决过程和方法。
A机器为老服务器,B为新服务器,A机器使用Appserv,B使用wmap,在配置多站点时候,遇到了一点儿不同。
除了都要打开httpd.conf
Include conf/extra/httpd-vhosts.conf
LoadModule rewrite_module modules/mod_rewrite.so
在httpd-vhosts.conf中配置多站点对应的目录
<virtualhost> ServerAdmin xieecjtu@163.com DocumentRoot "C:/wamp/www/wp" ServerName B.com ServerAlias www.B.com ErrorLog "logs/dummy-host.x-error.log" CustomLog "logs/dummy-host.x-access.log" common <directory> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </directory> </virtualhost> <virtualhost> ServerAdmin xieecjtu@163.com DocumentRoot "C:/wamp/www/" ServerName www.A.com ErrorLog "logs/dummy-host2.x-error.log" CustomLog "logs/dummy-host2.x-access.log" common <directory> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </directory> </virtualhost>
下面这一段是 wmap设置新加的设置
<span><span>Directory</span><span>"C:/wamp/www/"</span><span>></span><span>Options</span><span>Indexes</span><span>FollowSymLinks</span><span>AllowOverride</span><span>All</span><span>Order</span><span> allow</span><span>,</span><span>deny </span><span>Allow</span><span> from all </span><span></span><span>Directory</span><span>></span></span>
从A机器把网站源码搞到B机器上,很多方法,ftp
A机器上用mysqldump把对应的db备份起来,通过ftp下载到B机器上。一定要设定字符集,不然导入到b机器上时候,会出错。
mysql.exe -uroot -p**** –default-character-set=utf-8 mydb mytable > mytable.sql
b机器上执行 mysql -uroot -p –default-character-set=utf8 mytable mytable.sql
事先在b机器上创建好 mytable库,注意数据库编码要和原来的保持一致
使用navicat来备份还原经常会出现这个问题。很可能就是编码的原因
1,.htaccess要开放写权限,这样在自定义wp的永久链接时,wp会自动重写.htaccess。所谓删除或手动重写.htaccess就是因为没有开放它的写权限。
2,找到APACHE文件中的httpd.conf文件, 把#LoadModule rewrite_module modules/mod_rewrite.so 前的#去掉,加载rewrite模块。
3,查看APACHE文件中的httpd.conf文件是否默认设置了AllowOverRide为None,如果是,要改成All。或者修改 wordpress所在的vhost段添加 AllowOverride All
htaccess文件。
重启apache,一切搞定。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

There are four ways to adjust the WordPress article list: use theme options, use plugins (such as Post Types Order, WP Post List, Boxy Stuff), use code (add settings in the functions.php file), or modify the WordPress database directly.

MySQL and phpMyAdmin are powerful database management tools. 1) MySQL is used to create databases and tables, and to execute DML and SQL queries. 2) phpMyAdmin provides an intuitive interface for database management, table structure management, data operations and user permission management.

WordPress IP blocking plugin selection is crucial. The following types can be considered: based on .htaccess: efficient, but complex operation; database operation: flexible, but low efficiency; firewall: high security performance, but complex configuration; self-written: highest control, but requires more technical level.

To log in to a WordPress website account: Visit the login page: Enter the website URL plus "/wp-login.php". Enter your username and password. Click "Login". Verification Two-step Verification (optional). After successfully logging in, you will see the website dashboard.

WordPress Error Resolution Guide: 500 Internal Server Error: Disable the plug-in or check the server error log. 404 Page not found: Check permalink and make sure the page link is correct. White Screen of Death: Increase the server PHP memory limit. Database connection error: Check the database server status and WordPress configuration. Other tips: enable debug mode, check error logs, and seek support. Prevent errors: regularly update WordPress, install only necessary plugins, regularly back up your website, and optimize website performance.

Enable comments in WordPress website: 1. Log in to the admin panel, go to "Settings" - "Discussions", and check "Allow comments"; 2. Select a location to display comments; 3. Customize comments; 4. Manage comments, approve, reject or delete; 5. Use <?php comments_template(); ?> tags to display comments; 6. Enable nested comments; 7. Adjust comment shape; 8. Use plugins and verification codes to prevent spam comments; 9. Encourage users to use Gravatar avatar; 10. Create comments to refer to

WordPress editing dates can be canceled in three ways: 1. Install the Enable Post Date Disable plug-in; 2. Add code in the functions.php file; 3. Manually edit the post_modified column in the wp_posts table.

The steps to create a custom header in WordPress are as follows: Edit the theme file "header.php". Add your website name and description. Create a navigation menu. Add a search bar. Save changes and view your custom header.
