• Skip to primary navigation
  • Skip to main content
Daniel McClure

Daniel McClure

Entrepreneurship, Marketing, Technology, Travel & Lifestyle

  • About
  • Credentials
  • The Blog of Daniel McClure
  • Social
  • Code
  • Contact
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter

Run WordPress Updates, WordPress Plugin Updates, and WordPress Theme Updates Automatically

Code snippet posted to GitHub Gist by Daniel McClure.

You are here: Home » Code Snippets » #PHP » Run WordPress Updates, WordPress Plugin Updates, and WordPress Theme Updates Automatically

Last Updated: December 13, 2018 Leave a Comment

The following is a code snippet originally posted by Daniel McClure on GitHub as a Gist.

wp-config.php

“`
Original Gist


<?php
/*
* Select one or more of the options below to your wp-config.php file to have WordPress updates run automatically.
*/
// Apply Major WordPress Updates Automatically
define( 'WP_AUTO_UPDATE_CORE', true );
// Apply Minor WordPress Updates Automatically
define( 'WP_AUTO_UPDATE_CORE', 'minor' );
// Update *all* WordPress Plugins Automatically – Use with caution as this can have unintended consequences
add_filter( 'auto_update_plugin', '__return_true' );
// Update *all* WordPress Themes Automatically – Use with caution as this can delete any changes you have made to your theme
add_filter( 'auto_update_theme', '__return_true' );

view raw

wp-config.php

hosted with ❤ by GitHub

Filed Under: GitHub Gist Tagged With: #PHP, #Wordpress

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *

You can encrypt your comment so that only Daniel McClure can read it.

Daniel McClure

Work With Me

Get in touch if you’re interested in working together on your next project.

Contact Me

Creative Commons Licence

Copyright © 2025 Daniel McClure

All opinions shared through this site are that of their respective author and are not necessarily representative of the views of past/present clients, affiliate partners or businesses.
Some links include affiliate tracking for which I may earn a commission. See the Full Disclaimer Page for more information.