WordPress Automatic Update cannot enter the background solution

Source: Internet
Author: User
Tags constant php file php and wordpress database

This morning, after receiving the notification from 3.8.3, I took a look at the comments in the background. I didn't expect the prompt "your WordPress database is up to date !", See the following figure.

Click the "Continue" button to directly jump back to the home page, no matter how I refresh it.

After thinking about it, I have encountered it manually before. It is generally caused by cache plug-ins. My blog has installed the database cache plug-in db-cache-reloaded-fix, so it is connected to ftp:

1. Rename the plug-in folder

2. The db. php and db-config.ini generated by this plug-in the wp-content directory were renamed

Solution!

Restore the db-cache-reloaded-fix plug-in:

1. Visit the wp background plug-in list (an error message such as db-cache-reloaded-fix is prompted)

2. Change the renamed File/folder back.

3. Delete all cache files in the cache folder under the db-cache-reloaded-fix Directory (wp-content/plugins/db-cache-reloaded-fix/cache)

4. Refresh the WordPress background plug-in list and reactivate db-cache-reloaded-fix.

A simple untried solution: you don't need to change the name or something, directly delete all cache files in the cache folder under the db-cache-reloaded-fix Directory (in this case, you can try this method first ).

If other cache plug-ins (such as widget-cache, object-cache, wp-super-cache, wp-widget-cache, etc.) are installed, and so on.

----

I have previously said, "If a cache plug-in is used, it is best to clear the cache and stop the cache plug-in and upgrade it." This WordPress Automatic update does not take into account the consequences of using the cache, although each small update of the cache plug-in may not be "messy ".

Since there is a compatibility problem with the cache plug-in, you need to disable "automatic updates in the background" and go to the WordPress official scan. There are two major methods:

1. Define constants in the wp-config.php file

2. Filter (filters. (I personally prefer this method)

Disable all automatic updates

Method 1. Add the following constant in the wp-config.php:

Define ('IC IC _ UPDATER_DISABLED ', true );

Method 2: Use the following filter: (put it in the topic's functions. php, the same below)

Add_filter ('IC IC _ updater_disabled ',' _ return_true ');

By the way, the WordPress background automatic update function has the following four types of updates:

Core file update (in three modes)

Core Development Update mode: the "bleeding edge" mode, which is synchronized with the development version. You can try it if you are an exclusive enthusiast and an early adopter of WordPress.

Core update mode for minor versions: Release of versions for security and maintenance, for example, update 3.8 to 3.8.1.

Major version core update mode: for example, 3.8 Update 3.9.

Agent update

Topic update

Translation File update

Core update

Method 1. Define the following three values of the constant WP_AUTO_UPDATE_CORE in the wp-config.php file to set different update modes:

True-all minor updates, and major updates are automatically updated.

False-development version, minor update, and major update are not automatically updated.

Minor-only minor version updates are automatically updated.

Method 2. Filter (Filters): allow_dev_auto_core_updates, allow_minor_auto_core_updates, and allow_major_auto_core_updates

There are two Built-in WordPress functions for enabling and disabling: __return_true and _ return_false. For example:

Enable synchronization between the development update mode and the development version:

Add_filter ('allow _ dev_auto_core_updates ',' _ return_true ');

Disable minor version updates:

Add_filter ('allow _ minor_auto_core_updates ',' _ return_false ');

Enable major version update:

Add_filter ('allow _ major_auto_core_updates ',' _ return_true ');

Plug-ins and theme updates

Automatic Update of plug-ins and themes is disabled by default. You can use the filter auto_update _ $ type to enable them, where $ type is "plugin" or "theme ".

Enable automatic update of plug-ins:

Add_filter ('auto _ update_plugin ',' _ return_true ');

Enable automatic topic update:

Add_filter ('auto _ update_theme ',' _ return_true ');

Translation Update

The translation update is enabled by default. To disable the update, you can:

Add_filter ('auto _ update_translation', '_ return_false ');

Generally, things that are too automatic are more prone to problems, Orz

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: info-contact@alibabacloud.com 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.