Solution to blank pages of wordpress posts

Source: Internet
Author: User
Tags ftp generator setcookie blank page phpmyadmin

Recently, a netizen updated the vps of the blog to the environment. It seems that php has been upgraded to 5.6. Then, a problem occurs in wordpress. When you click to publish or update an article, wordpress will jump to the post. php blank page. You need to press enter again to jump to other webpages. Although the article can be published and updated as usual, it is still abnormal. Reasons for wordpress publishing articles to jump to the blank post. php page and solutions


Go to the debug mode of wordpress and set:
Define ('WP _ debug', false );


Define ('WP _ debug', true );

Then try to publish a new article again, and the following error will be reported:

Warning: Illegal string offset 'LC _ is_update_sitemap_when_post 'in/data/wwwroot/ on 406

It seems that this is caused by a plug-in problem called "baidu-sitemap-generator" in wordpress. After the plug-in is disabled, the problem is solved.

As for the code, I have not analyzed much. It is estimated that it is not compatible after php5.6. You can try to comment out the line or related judgment conditions that reported the error, so as not to delete the plug-in. However, this plug-in is redundant for me, because I already have the official sitemap submit plug-in from Baidu. I 'd like to delete it directly, because the province occupies resources.

Add some solutions to the problem

1. WordPress plugin conflict

This is a better solution. Use FTP to modify the name of the plug-in folder and check whether the plug-in folder can be logged on to the background. If you can, it can be proved that this is a plug-in conflict problem. If you are troubleshooting which plug-in is used one by one, you don't have to teach you how to do it later.

2. WordPress template topic

Sometimes, when you update an upgraded version, the problem may be incompatible with the topic, you can also change the name of the currently used theme folder by entering the theme folder through FTP, and then change the name of the theme that comes with WordPress to the name of the theme you are currently using (the name of the folder)

3. WordPress encoding problems

I found a problem because of wp-config.php encoding, itself is a UTF-8 but the solution is to change the encoding format to ANSI and save it as upload overwrite.

4. WordPress folder permissions

For permission issues, you can change the directory familiarity to 777. The FTP change method is to right-click the directory and click "familiarize". Change the permission to "777.

5. cookies

Solution: open "/wp-receivdes/pluggable. php" to modify the wp_set_auth_cookie function. The modification method is as follows:

Setcookie ($ auth_cookie_name, $ auth_cookie,
$ Expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $ secure, true );
Modify the above code:

Setcookie ($ auth_cookie_name, $ auth_cookie,
$ Expire, SITECOOKIEPATH, COOKIE_DOMAIN, $ secure, true );
I have tried all of the above methods, but I still can't do it. I 'd better reinstall it. In fact, the reinstallation is very simple. You only need to complete the steps. The rest is to pay attention to some small details.

1. FTP remove wp-config.php files
2. Back up the database and log on to the new website and follow the installation steps.
However, I used the above method to fill in the database name, password, and other information to determine the next step is a familiar blank page. Oh, my God, you still want me to survive. Then I changed the method.

1. FTP creates a folder separately and uploads a new version of WordPress
2. Log in to phpMyAdmin and rename the form Prelude (it is a lazy Backup. After installation, change the form to the form prelude you added during installation)
3. After successfully installing WordPress, log on to phpMyAdmin and change the previous data form to your newly installed WordPress form prelude. Of course, you can delete these newly installed database forms.
4. On the background page, you will be prompted to upgrade the database and click upgrade.
5. Move the previous plug-ins, themes, and uploaded images to the newly installed WordPress folder through FTP. This is done. (It really hurts .)
(In step 2 and 3, I did not understand it before. In fact, this is the case: first change the old wordpress table prefix. Generally, the default value is WP _. You can change it to WP1 _, after installing the new wordpress, delete all the data tables prefixed with WP _ and change the old WP1 _ to WP. However, you must remember to back up the data before the operation !)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.