Disable ALL wordpress updates - wordpress

does this line of code disables all updates?
define( 'AUTOMATIC_UPDATER_DISABLED', true );
I mean, all core, minor, plugin, themes, etc.?

Yes it will disable the automatic installation of new updates but It will still check for new updates and display them.
If you're going to apply some patches you can still do it manually.

Related

Notice: register_rest_route was called incorrectly

In my Wordpress site, this issue appears when adding or editing posts.
Notice: register_rest_route was called incorrectly. REST API routes must be registered on the rest_api_init action. Please see Debugging in WordPress for more information. (This message was added in version 5.1.0.) in /project/wp/wp-includes/functions.php on line 5167
Note: I didn't make any WP update or any plugin update on the site.
Any idea to fix this issue? Thank you.
In WordPress 5.5, a change was made to how REST routes are registered and now required a permission_callback.
The reason you may see it the notice on one site and not all is that notices only appear when WordPress is run in DEBUG mode, confirm by checking the value of wp-config.php for
define( 'WP_DEBUG', true );
If the site showing the notices should not be in debug mode, simply change the value of WP_DEBUG to false.
A plugin or your theme are creating a REST-Api route in a wrong hook.
This is correctly done by using add_action('rest_api_init', 'function_to_create_end_endpoint');
function_to_create_endpoint contains the function register_rest_route().
In your case it's something else ('init' or 'plugins_loaded' instead of 'rest_api_init')
Some solutions:
Update all Plugins/your Theme to a current Version
If this doesn't help you can: Deactivate Plugins one by one, to see which one causes the issue, than maybe replace it or check if is abandoned
Search for "register_rest_route" in your wp-content folder and find the plugin that calls it in a hook something other than "rest_api_init".
Lastly Notices only show up when you turn on full debugging in your wp-config, this isn't meant for sites running in production. You could turn it off.

Wordpress keeps on updating even after disabling auto update

I want to disable all updates in my website. I have set below variable in wp-config.php file.
define( 'automatic_updater_disabled', true );
define( 'wp_auto_update_core', false );
But I don't know why, every other day it keeps on updating itself, which breaks some of my code.
Does any one know how to disable the updates PERMANENTLY !
By default, WordPress can automatically update itself when a security or minor release is available.
For major releases, you have to initiate the update yourself. You also have to install plugin and theme updates yourself.
Wondering if you are on Managed Wordpress hosting??
IF YES then that's where those updates are happening automatically.
You can Hosting support to not update without confirming with you.
define( 'AUTOMATIC_UPDATER_DISABLED', true );
define( 'WP_AUTO_UPDATE_CORE', true );
Disable automatic WordPress plugin updates:
add_filter( 'auto_update_plugin', '__return_false' );
Disable automatic WordPress theme updates:
add_filter( 'auto_update_theme', '__return_false' );
For your better understanding please visit here
On some hosting platforms you install Wordpress as an 'App' through something like Installatron. This has settings about updating Wordpress too, you may want to check for this in your hosting backend/dashboard.
It looks like this
Where it says My blog it will probably say Wordpress. If you click edit below, it has some settings about updating.

My wordpress updated automatically

Without changing anything WordPress version updated from 4.9.4 to 4.9.5. on Azure server.
Please let me know how this happened?
It is an auto-update. (as already show in the image you posted)
By default, only minor releases – such as for maintenance and security purposes are auto-updated but they are configurable. This is the recommended behavior.
However this can be prevented by defining certain constants or by applying filter hooks
To completely disable all types of automatic updates, core or otherwise, add the following to your wp-config.php file:
define( 'AUTOMATIC_UPDATER_DISABLED', true );
You can also disable all automatic updates using the following filter:
add_filter( 'automatic_updater_disabled', '__return_true' );
It is also possible to allow the partial updates.
The detailed instruction can be found in the link https://wordpress.org/support/article/configuring-automatic-background-updates/

Can't upgrade WordPress or add new plugin while logged in as admin (using Sage theme)

I am logged into a WordPress site backend as an administrator. The theme was built using the Sage Starter Theme.
During development there was no issue with adding plugins or upgrading the core, but since moving to production, there is no "Add New" button for plugins and the upgrade message reads "WordPress 4.3 is available! Please notify the site administrator."
I tried manually changing the db_version field of the wp_options table to force a database upgrade. This didn't work.
I tried disabling all plugins and changing to the twentyten theme - this did not work.
Checked all permissions on the server - no joy.
How can I resolve this issue?
The latest Sage Starter theme uses a .env file to set up environments via the phpdotenv library. It lives in a directory above the public HTML web root of the WordPress installation.
If you changed the line WP_ENV=development to WP_ENV=production in the .env file when the site went live, then it's likely this is the source of the issue.
If you look at the actual configuration for the production environment in /config/environments/production.php, you see the following:
define('DISALLOW_FILE_MODS', true); // this disables all file modifications including updates and update notifications
This tells WordPress not to allow manual addition of plugins or allow core updates. You can simply edit this to be:
define('DISALLOW_FILE_MODS', false); // allow file modifications including updates and update notifications
After you've modified the core or added plugins, you can simply change it back if you don't want admins to have this power, but a better solution would be to install a capability manager plugin and define an admin role with slightly lower privileges.
For anyone else with this problem, there is another line that you may have to find in your wp-config or functions file and change to false:
define('DISALLOW_FILE_EDIT', true);
I can't find the line define('DISALLOW_FILE_MODS', true); or define('DISALLOW_FILE_MODS', false); in my wp-config.php file.
My solution: I just added the line define('DISALLOW_FILE_MODS', false); in wp-config.php file after define('DB_HOST', 'localhost'); /* or anywhere */
That SOLVED my problem and I was able to update again core, theme and plugins.
In my case, the problem was caused by the removed permissions for my "administrators" user group.
More exactly the update_core were missing in wp_options table option_name = %wp-table-prefix%_wp_user_roles
The easiest way to fix it is to install PublishPress Capabilities plugin and you can find it in the "Admin" tab. First, click black X (negate all) and save and then you can enable it.
The same maybe for plugins and themes updates.

Wordpress Plugin to identify what php code a page use

I'm looking a plugin that allow me to know/identify when I am in a page the php classes used in that page.
For example, a page can be part of a plugin or a part of a template,
so if I have to change it how can I know where I need to change the code among the many php classes?
Thanks so much
You can set on your wp-config.php file:
define( 'WP_DEBUG', true );
It will enable the “debug” mode throughout WordPress.
When set to "true", you’ll start seeing PHP notices, WordPress-generated debug messages, deprecated function usage, etc.
If this is not enough for you, you can try this plugin:
https://wordpress.org/plugins/debug-my-plugin/

Resources