Table of Contents
WordPress博客程序常见错误的解决方法
Home php教程 php手册 WordPress博客程序常见错误的解决方法

WordPress博客程序常见错误的解决方法

Jun 13, 2016 am 09:07 AM
wordpress blog common method of program solve mistake

WordPress博客程序常见错误的解决方法

   WordPress是主流的 Blog 搭建平台。 WordPress 可以说是世界上目前最先进的 weblog 程序。目前开发的程序大多都是根据它仿造的。它更能把握搜索引擎,在你使用 WordPress 并掌握几种插件后,对于优化将不用过多的操心,它会为你想的更多。

  如果你是一个喜欢随手编上一段代码的WordPress 用户,又或者你是一个喜欢安装插件,改变主题的用户,你就会明白,错误是没有办法避免的。你也会明白当你卷入一个无法预计的错误,而又没有找到解决办法的时候是有多么的绝望。事实上,大部分的 WordPress 错误问题都是可以解决的。所以当你遇到一个错误的时候,不要焦急,因为很可能你遇到的这个问题别人也遇到过,而且已经有解决办法了。

  在今天的文章当中,我们来看看那些最常见的 WordPress 错误,然后给大家分享一下解决办法,让你看完帖子之后不再苦恼,能更愉快的写博客。

  一、忘记了用户密码同时邮件找回功能不起作用

  问题描述:

  你丢失了你的WordPress 管理员密码,也尝试过点“忘记密码” 进去填写了用户名和 Email 地址。但是却没有收到重设密码的邮件。

  这里有两个很简单的方法来重设你的 WordPress 管理员密码:

  [page_break]

  方法 1: phpMyAdmin

  1. 如果您是 cPanel 空间用户,登录 cPanel 后,点击 Database(数据库) 下的 phpMyAdmin

  2. 选择你的 WordPress 数据库。例如 Username_wrdp1

  3. 找到 wp_users,点击 Browse

  4. 找到你的用户名然后点击 Edit。

  5. 通过在 user_pass 里写入新的值来重设你的密码。记住,是有大小写区分的。

  6. 完成上面一步之后,点击 Function 的下拉菜单,从选项中选择 MD5

  7. 在页面的最低端,点击 Go 按钮。

  [page_break  方法2:通过 FTP

  1. 登录你的 FTP 账户。

  2. 找到 ../wp-content/themes/(你的主题文件)/ 目录,然后下载 functions.php 文件。

  3. 打开 functions.php 然后在第一个

  wp_set_password('YourNewPassword',1);

  把 YourNewPassword 这个值换成你想要的密码。这个代码里的 1 代表的是 wp_users 表上的 用户 ID。

  4. 把改好的 functions.php 再次上传到 FTP 当中。

  5. 当你可以登录到 WordPress 的时候,再去删掉那行代码。

  二、WordPress 控制面板(Dashboard)不能正常显示

  问题描述:

  WordPress 控制面版里面的 CSS 未能显示出来,页面上的链接很乱。

  解决方法1:端口和防火墙

  检查一下你的网络连接是经过端口和防火墙的。有一些端口和防火墙是会过滤到 CSS 的,所以有 CSS 的地方会显示不正常。试着清除端口和防火墙的 cookies 和缓存,然后 Ctrl + F5 重新载入页面。

  解决方法2:升级你的 WordPress 插件

  如果你有一些插件是用来代替默认的控制面板的,像 Admin Drop Down Menu 和 Lighter Menus ,那么就升级一下这些插件,如果还是不起作用,那就禁用试试看。

  三、警告Warning:Cannot modify header information – headers already sent by

  问题描述:

  在升级WordPress 到新的版本或者是全新安装之后,在浏览器里遇到这样的错误:Warning:Cannot modify header information – headers already sent by (output started at /path/blog/wp-config.php:34)

  解决办法:删掉 wp-config.php 里面多余的空格,空行以及其他无用信息。

  1. 通过 FTP 下载 wp-config.php 文件

  2. 打开 wp-cinfig.php

  3. 去除

  4. 确保第一个字段是

  5.去除 ?> 后的所有空格。

  6. 确保最后的字符是 ?>,放到最后一行,确保中间没有空格。

  这个错误可以发生在其他的文件。仔细阅读错误信息,上面有记录出错的文件的位置的。

  [page_break  四、WordPress 博客页面和控制面板一片空白

  问题描述:

  这个错误一般是发生在安装了新的主题,或者是升级到了新的版本。打开博客就是一个空白页面。在控制面板那里也会遇到这样的情况,这样就没有办法进入到控制面板了。

  解决方法1:通过 FTP 重新命名当前安装的主题。

  把当前安装的主题文件夹重命名的话,会强制 WordPress 自动选择默认的主题,然后就可以正常载入了。

  1. 通过 FTP 找到 wp-contents/themes 文件夹。

  2. 重命当前安装的主题文件夹。例如:把 twentytwenty 命名为 twentytwenty-temp

  3. 登录到你的 WordPress 后台。

  4. 检查一下你的主题和你现在运行的 WordPress 是否兼容。

  5. 检查一下你的主题是否包含不能够被执行的代码。

  解决方法2.:通过 FTP 重设插件文件夹

  1. 通过 FTP 找到 wp-contents 文件夹。

  2. 把 plugins 文件夹重命名为 plugins-temp

  3. 在同一目录下创建一个新的文件夹为 plugins

  4. 再次登录一下 WordPress 控制面板。

  5. 把你的插件从 plugins-temp 移到 plugin ,然后逐个重新激活。

  6. 检查一下是否有插件与当前的 WordPress 不兼容。

  [page_brea  五、致命错误:Fatal error: Allowed memory size of 33554432 bytes exhausted

  问题描述:

  当你在上传照片的时候,遇到 Fatal error: Allowed memory size of 33554432 bytes exhausted 错误信息。为了解决这个问题,应该尝试去增加分配到 PHP 的内存。你可以把限制设置为 32MB, 64MB, 128MB 或者是 256MB,这个要看你的主机商是否支持。

  解决方法1:编辑 php.ini

  如果你可以编辑 php.ini 文件,那么可以直接在上面修改 memory_limit 这个值。

  memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)

  如果默认的显示是 64M,尝试 128M。

  解决方法2:.htaccess 文件

  把下面那行代码加入到 .htaccess 文件里面。

  php_value memory_limit 64M

  解决方法3:编辑 wp-config.php 文件

  把下面代码加入到 wp-config.php 文件里面。

  Increasing memory allocated to PHP

  define('WP_MEMORY_LIMIT', '64M');

  解决方法4:在 wp-admin 文件夹里面 新建一个 php.ini 文件。

  1. 打开记事本。

  2. 插入以下代码:

  memory_limit = 64M ;

  3.保存为 php.ini。

  4. 上传到 wp-admin 目录。

  六、你没有权限浏览这个页面(403错误)

  问题描述:

  在后台登录页面输入用户名密码的时候收到这样一个错误:You are not authorized to view this page. (403 error)

  解决办法:启用 index.php

  如果你的博客是安装在 Windows Server 上的,这是因为 IIS 没有设置默认首页为 indexx.php 而引起这个错误。

  1. 打开 控制面板。

  2. 打开 IIS 管理。

  3. 找到 默认首页 部分。

  4. 加入一个 index.php。

  七、致命错误:Fatal error undefined function is_network_admin()

  问题描述:

  在你升级完 WordPress 的时候,尝试登录的时候出现 Fatal error undefined function is_network_admin()致命错误。

  解决办法:手动升级

  这个错误是由于 WordPress 升级失败造成的。尝试手动升级。

  1. 下载最新的 WordPress 压缩包并解压。

  2. 备份你现在的 WordPress。

  3. 重命名 wp-includes 和 wp-admin 目录为 wp-includes.bak 和 wp-admin.bak。

  4. 通过FTP上传 wp-includes 和 wp-admin 目录到服务器是上。

  5. 把新的 wp-content 目录里面的东西上传到服务器上的相应位置。

  6. 上传其他文件到 WordPress 根目录。

  7. 通过 FTP 把 .maintenance 文件删掉。

  8. 重新登录到 WordPress 你会看到一个像这样的链接 http://你的域名/wordpress/wp-admin/upgrade.php ,按说明进行操作。

  9. 清空缓存,然后看看你否生效了。

  更多的关于手动升级的细节,请查看:Updating WordPress

  [page_break]  八、WordPress 登录界面 404 问题

  问题描述:

  你没有办法登录到 WordPress 后台,显示 404 错误。

  解决办法1: 在数据库你面更新 URL。

  如果你可以进入到 phpMyAdmin,尝试在数据库里面更新 URL。

  1. 登入到 cPanel,点击 Databases 里面的 phpMyAdmin。

  2. 选择你的 WordPress 数据库,例如:Username_wrdp1。

  3. 进入 wp_options ,点击 Browse。

  4. 在字段 option_name 下面搜索 siterul。

  5 点击 Edit Field。

  6. 在 option_value 选项里面更改 URL。

  7. 在最底部点击确认。

  解决方法2:更改文件夹属性。

  1. 在 FTP 下进入 /wp-admin 目录。

  2. 右击 wp-admin 目录,然后点击文件夹属性。

  3. 把属性值改为 755 然后再检查一下子目录有没有相应选项。

  4. 点击 OK。

  5. 把 1 - 4 步骤在 wp-content 和 wp-includes 文件夹里面都操作一遍。

  6. 打开你的浏览器,然后尝试登录 WordPress。然后按 Ctrl + F5 清空缓存。

  [page_break  九、完成自动升级之后显示 Briefly unavailable for scheduled maintenance 错误

  问题描述:

  如果你的站点在完成升级之后显示 Briefly unavailable for scheduled maintenance 错误信息。

  解决办法:删除 .maintenance 文件。

  在你进行升级的时候会生成一个叫做 .maintenance 的文件,是用来提醒访客网站正在维护。如果升级失败了的话,这个文件还会保留在文件夹里面。

  删掉 .maintenance 的步骤。

  1. 通过 FTP 登录到你博客的根目录。

  2. 找到 .maintenance 文件。

  3. 在根目录里面删掉 .maintenance 文件。

  一旦你解决了这个问题,你就可以去再次进行自动升级的操作了。

  十、无法删除插件

  问题描述:

  你无法在 WordPress 控制面板里面删掉某一个插件。在你通过 FTP 删掉插件的文件夹之后还是无法在控制面板删除。

  解决办法:通过 SSH 来删除插件。

  你的插件可能上传过一些隐藏文件到目录里面,这些目录在 FTP下是不可见的。

  如果你的博客可以通过 SSH 登录:

  1. 通过 SSH 登录到你的博客。

  2. 用 SSH 命令找到该目录:wp-content/plugins/

  3.用命令 ls -al 显示整个文件夹。

  4. 用 rm 目录名称 命令删除插件。

  由于WordPress的广泛性,暂时只能列出这几个常见问题的解决方法,希望对大家有帮助哦~

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

Video Face Swap

Video Face Swap

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

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)

Recommended product registration plug-in for easy-to-use wordpress Recommended product registration plug-in for easy-to-use wordpress Apr 20, 2025 am 08:15 AM

There is no perfect WordPress product registration plugin, the choice should be based on actual needs and website size. Recommended plug-ins include: MemberPress: powerful but high-priced, complex configuration Restrict Content Pro: Focus on content restrictions and member management, cost-effective Easy Digital Downloads: Sell digital products, and users register as additional functions

How to display wordpress comments How to display wordpress comments Apr 20, 2025 pm 12:06 PM

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 website is online but cannot be searched WordPress website is online but cannot be searched Apr 20, 2025 am 09:00 AM

Reasons why WordPress websites cannot be found in search engines: 1. Indexing issues; 2. Content issues; 3. Website technical issues; 4. Link issues; 5. Other issues such as geographical restrictions, website name and social media presence.

How to close comments with wordpress How to close comments with wordpress Apr 20, 2025 am 11:54 AM

How to turn off a comment in WordPress? Specific article or page: Uncheck Allow comments under Discussion in the editor. Whole website: Uncheck "Allow comments" in "Settings" -> "Discussion". Using plug-ins: Install plug-ins such as Disable Comments to disable comments. Edit the topic file: Remove the comment form by editing the comments.php file. Custom code: Use the add_filter() function to disable comments.

What to do if there is an error in wordpress What to do if there is an error in wordpress Apr 20, 2025 am 11:57 AM

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.

WordPress website building and avoid pits WordPress website building and avoid pits Apr 20, 2025 am 08:06 AM

Be cautious when building a WordPress website. The guide to breaking through pits helps you avoid risks: choose paid themes and avoid the quality and safety risks of free themes. "Less is more" when installing plugins to avoid website speed and compatibility issues. Regularly optimize the database to ensure the smooth operation of the website. Pay attention to security measures and regularly update and install security plug-ins. Modify the code carefully to avoid website crashes and do it in a test environment if necessary. Pay attention to performance optimization, improve website speed, and improve user experience.

WordPress website account login WordPress website account login Apr 20, 2025 am 09:06 AM

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.

How to adjust the wordpress article list How to adjust the wordpress article list Apr 20, 2025 am 10:48 AM

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.

See all articles