Of course, if you think it is necessary to check for updates, you should keep them well, but webmaster friends in the following three situations:
1. If your WordPress website has been officially released and its appearance and functions have been finalized, you can disable automatic updates.
2. Shut down the webmaster suffering from incompatibility caused by Updates. The WordPress or plug-in used will not report very serious vulnerabilities.
3. If you are tired of background update prompts, you can consider closing them.
Although the tribe recommends that you disable automatic updates, we also recommend that you keep an eye on the theme or version updates. After all, the new version always fixes some vulnerabilities.
WordPress completely disables automatic update of themes and plug-ins
Add the following code to "?>" in functions. php under the topic directory" Any previous location:
The code is as follows: |
Copy code |
Add_filter ('pre _ site_transient_update_core ', create_function (' $ A', "return null;"); // Close the core prompt Add_filter ('pre _ site_transient_update_plugins ', create_function (' $ A', "return null;"); // Add_filter ('pre _ site_transient_update_themes ', create_function (' $ A', "return null;"); // Close the theme prompt Remove_action ('admin _ init ',' _ maybe_update_core '); // disable WordPress from checking for updates. Remove_action ('admin _ init ',' _ maybe_update_plugins '); // disable the WordPress update plug-in. Remove_action ('admin _ init ',' _ maybe_update_themes '); // disable WordPress from updating a topic. |
Some friends, may think it is over here, in fact not yet, we also need to add the following code in the wp-config.php under the WordPress root directory:
The code is as follows: |
Copy code |
/** Disable automatic update */ Define ('IC IC _ UPDATER_DISABLED ', true ); |
As shown in the following figure:
In this way, your WordPress will not automatically prompt the annoying update.