> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Disabling WordPress plugin updates using PHP

> Learn how to disable WordPress plugin updates to help keep any site code customization. This article shows you how to disable plugin updates using PHP.

[WordPress](https://hosting.com/hosting/platforms/wordpress-hosting/managed-wordpress-hosting/) automatically checks and prompts plugin updates if there is any available. Updating plugins might wipe off any code customisation by the developer. Therefore developers prefer to have the plugin updates disable to prevent accidental plugin updates. This article shows you how to disable plugin updates using a [PHP](/docs/php) function.

## Disabling Plugin Updates

<Warning>
  **Important**

  Always perform a backup before you make any changes to the theme files. If you break any codes, it will be easier to revert your site to its last good known state. Alternatively, you could also create a child theme. Read this link on how to create a child theme: [https://www.hosting.com/blog/wordpress-child-theme/](https://www.hosting.com/blog/wordpress-child-theme/)
</Warning>

Follow the steps below to edit your Theme setting file to disable plugin updates  in WordPress:

1. Log in to your WordPress site with an administrator account.

2. On the **Dashboard** in the left sidebar, click **Appearance**, and then click **Theme Editor**:\
   ![](https://static.hosting.com/kb/kb-wp-disableplugin-4.png)

3. On the **Theme Editor**, select the **Theme** you want to edit from the dropdown:\
   ![](https://static.hosting.com/kb/kb-wp-disableplugin-1.png)

4. The files for this selected theme are listed on the right column under Theme Files. Click on the file named "**functions.php**":\
   ![](https://static.hosting.com/kb/kb-wp-disableplugin-2.png)

5. Insert the following code to the end of functions.php file and click **Update File** button to save the changes:

```
remove_action( 'load-update-core.php', 'wp_update_plugins' );

add_filter( 'pre_site_transient_update_plugins', create_function( '$a', "return null;" ) );
```

## Related articles

* [Adding external RSS feeds to your WordPress site](/docs/adding-external-rss-feeds-to-your-wordpress-site)

* [Customizing the number of search results displayed in WordPress](/docs/customizing-the-number-of-search-results-displayed-in-wordpress)
