后来发现在 wp-config.php 有个 debug 的参数,打开这个参数,修改为:
define('WP_DEBUG ','true');修改这个后,非常不错,报了很多错,一堆。。。。
使用修复的命令来修复。
mysql>repair table wp_options;搞定,然后关掉 DEBUG,解决问题。
以下是我的解決方法:
1.到phpMyAdmin新增一個使用者
假設帳號:test
密碼:test123
2.給予您Wordpress資料庫控制的權限
3.修改wordpress/wp-config.php檔案
vim wp-config.php
找到
// ** MySQL settings ** //
define(‘DB_NAME’, ‘wordpress_db’); // The name of the database
define(‘DB_USER’, ‘old_name’); // Your MySQL username
define(‘DB_PASSWORD’, ‘old_passwd’); // …and password
修改為
// ** MySQL settings ** //
define(‘DB_NAME’, ‘wordpress_db’); // The name of the database
define(‘DB_USER’, ‘test’); // Your MySQL username
define(‘DB_PASSWORD’, ‘test123′); // …and password
//把新的使用者換上即可
1.到phpMyAdmin新增一個使用者
假設帳號:test
密碼:test123
2.給予您Wordpress資料庫控制的權限
3.修改wordpress/wp-config.php檔案
vim wp-config.php
找到
// ** MySQL settings ** //
define(‘DB_NAME’, ‘wordpress_db’); // The name of the database
define(‘DB_USER’, ‘old_name’); // Your MySQL username
define(‘DB_PASSWORD’, ‘old_passwd’); // …and password
修改為
// ** MySQL settings ** //
define(‘DB_NAME’, ‘wordpress_db’); // The name of the database
define(‘DB_USER’, ‘test’); // Your MySQL username
define(‘DB_PASSWORD’, ‘test123′); // …and password
//把新的使用者換上即可
// ** MySQL设置 - 具体信息来自您正在使用的主机 ** //
/** WordPress数据库的名称,替换掉 “putyourdbnamehere” */
define('DB_NAME', 'xxxx');
/** MySQL数据库用户名,替换掉 “usernamehere” */
define('DB_USER', 'xxxxx');
/** MySQL数据库密码,替换掉 “yourpasswordhere” */
define('DB_PASSWORD', 'xxxxxxx');
/** MySQL主机名 */
define('DB_HOST', 'localhost');
/** WordPress数据库的名称,替换掉 “putyourdbnamehere” */
define('DB_NAME', 'xxxx');
/** MySQL数据库用户名,替换掉 “usernamehere” */
define('DB_USER', 'xxxxx');
/** MySQL数据库密码,替换掉 “yourpasswordhere” */
define('DB_PASSWORD', 'xxxxxxx');
/** MySQL主机名 */
define('DB_HOST', 'localhost');
重新整理Wordpress即可解決!!