I want my plugins and themes to be updated automatically but I am unable to do it.
This guide says that you have to add
add_filter( 'auto_update_plugin', '__return_true' );
to the code, but I don’t know where exactly should I add it. The guide also suggests to put it into mu-plugins but I have no idea how.
Can you please help?
1. Updating WordPress core:
If you want the WordPress auto updates to handle major core updates too, you will have to add a single configuration line. To do this, open the wp-config.php file in the root folder of your WordPress installation and add this line to it:
2. Updating WordPress plugins:
If you want your plugins to be automatically updated by WordPress when a new version is released, you need to add a line to your wp-config.php file, similar to the one above. This time, however, a filter is used for enabling the plugin auto updates:
3. Updating WordPress themes:
If you want WordPress to handle themes updates you need another line added to the wp-config.php file:
If you are getting problem like this – Do not add add_filter() calls in wp-config.php – causes conflicts with WP-CLI and possibly other problems. Then should have to put these filters into mu-plugins
You can add this code to
functions.php
file in your theme folder, so use FTP to add this line towp-contemt/themes/YOUR-THEME-NAME/functions.php