2

I'm working on a custom theme that lives in /var/www/html/wp-content/themes/custom/. It's for internal use, so it doesn't matter if there's a theme with the same name on the wordpress site.

But wordpress performs an update check, finds a theme with the same name, which has a newer version number, and so asks me to upgrade.

Is there a way to suppress this behavior without renaming my theme and without fiddling with version numbers? I don't want the check to be performed at all.

(BTW define('AUTOMATIC_UPDATER_DISABLED', true) doesn't help.)

1
  • Did you find a way to disable the update check? Jun 23, 2020 at 17:28

1 Answer 1

2

Yes, you can disable auto update by adding this line of code in your wp-config.php file:

define( 'WP_AUTO_UPDATE_CORE', false );

OR Disable automatic WordPress theme updates by adding the following filters in your functions.php

add_filter( 'auto_update_theme', '__return_false' );
8
  • 1
    Thanks. But from what I've read define('AUTOMATIC_UPDATER_DISABLED', true) disables ALL updates, and even that doesn't help.
    – lonix
    Dec 6, 2019 at 8:22
  • 1
    Also, I only want to disable the check for this theme - is that possible?
    – lonix
    Dec 6, 2019 at 8:22
  • 1
    In the official docs it says that the way I've done it should disable ALL checks. But that isn't what I've observed. The way you've proposed is a subset. So surely this is a hack?
    – lonix
    Dec 6, 2019 at 8:26
  • 1
    I think maybe this is a bug, or maybe it cannot be done :(
    – lonix
    Dec 6, 2019 at 8:27
  • 1
    Yes that's also a hack, and also performs a check - I mentioned that I want to avoid the version number trick and do something more robust. Thanks for your assistance though. Upvoted!
    – lonix
    Dec 6, 2019 at 8:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.