Hot answers tagged

119

It is an automatic lock to prevent simultaneous core updates. It will be gone after 15 minutes. If you don't want to wait, delete the record from options table – usually wp_options. Since Wordpress 4.5: option_name = 'core_updater.lock' If you have an older installation (before Wordpress 4.5): option_name = 'core_updater'


86

Add the following to wp-config.php: define( 'FS_METHOD', 'direct' ); Let me know how it works for you.


37

Hameedullah Khan's answer will throw a PHP warning. Include this if clause to check to make sure it's an object before unsetting the response for that plugin. 'Warning: Attempt to modify property of non-object' Try this to avoid the warnings (code for the plugin file itself): // remove update notice for forked plugins function remove_update_notifications($...


28

I had this problem once. You should check your wp-config.php file and if you find this line define('DISALLOW_FILE_MODS',true); change its value to false: define('DISALLOW_FILE_MODS',false);


28

The error message shows that the class description_walker extends the Walker_Nav_Menu class and overrides the start_el() method, but the signature differs from the method definition in the parent class. As mentioned in comments, it would be best to contact the developer of your theme and ask for a corrected version of the theme. If the developer cannot be ...


23

If you use wp-cli run the following command: wp option delete core_updater.lock This command will delete the option named: core_updater.lock


22

I for myself use a combination of: one file dedicated to the one-time script using a transient to stop the script from accidentally running more than once using capability-management or user-control to ensure the script is just run by me. Structure I use a file (onetime.php) in my include-folder inc, which is included in the functions.php, and deleted ...


22

Using WP-CLI you can specify this as described in the official documentation. $ wp plugin update <plugin> Using either of the following arguments --minor Only perform updates for minor releases (e.g. from 1.3 to 1.4 instead of 2.0) --patch Only perform updates for patch releases (e.g. from 1.3 to 1.3.3 instead of 1.4) --version=<version&...


21

This means that WordPress is having limited permission for making changes in the folder that it was installed. In-order to fix this, all that you need to do is provide necessary permissions for the same. Run the following Command in your Terminal / Putty / Commandline Prompt after connecting to your Server via SSH: sudo chown -R apache:apache /var/www/...


18

You can also do this: run onetime.php and rename it after execution. if ( current_user_can( 'manage_options' ) ) { if( ! file_exists( '/path/to/onetime.php' ) ) return; add_action( 'wp_footer', 'ravs_my_onetime_function' ); // execute my function on the desired hook. } function ravs_my_onetime_function() { // all my glorious one-time-...


17

In wp-admin/includes/update.php file if ( current_user_can('update_core') ) $msg = sprintf( __('An automated WordPress update has failed to complete - <a href="%s">please attempt the update again now</a>.'), 'update-core.php' ); else $msg = __('An automated WordPress update has failed to complete! Please notify the site ...


16

Maruti Mohanty’s suggestion is not bad, but it will fail. There are many core actions with a higher priority: wp-admin/menu.php: add_action('admin_menu', '_add_themes_utility_last', 101); wp-includes/admin-bar.php: add_action( 'wp_footer', 'wp_admin_bar_render', 1000 ); wp-includes/canonical.php add_action( 'template_redirect', '...


15

The only reason why the 3.3.3 milestone was marked as completed is because leaving the milestone open interfered with our ticket reports for 3.4.1. (I forgot that milestone closures are reflected in the timeline.) Generally speaking, we assign tickets to the next minor milestone if they are reporting an immediate regression. So, a regression in 3.2 that ...


11

Essentially, WordPress needs to connect back to the server where it is actually running on. There are several possible ways WordPress can use to write files and thus "overwrite" itself during an upgrade. From a security perspective, the important part of this process is that the new files must have the same ownership as the old files. So, WordPress ...


11

You can do this: add_filter( 'http_request_host_is_external', '__return_true' ); However, note that this disables this security feature. If you know the host or url isn't going to change and is always going to be that, you can be more secure by checking for that explicitly: add_filter( 'http_request_host_is_external', 'allow_my_custom_host', 10, 3 ); ...


10

If you like free ... and want to use something like GitHub, GitLab, or BitBucket, this is a good quality and supported plugin for handling it (supports private and enterprise): https://github.com/afragen/github-updater


10

Do not just upgrade immediately. Take the time you need for an informed decision. And make a backup, of course. :) Read the changelog for the new version. Example for 3.4.1. The blog announcements and the Codex pages are not complete. Test the upgrade with an exact copy of your production site, including plugins and themes. Add, change and delete an user, ...


10

Less than an answer, but just a list of things straight from my experience with it - maybe you've overlooked something. Debugging the request & its results Without diggin' too deep into the update process, but the WP HTTP API uses the WP_HTTP class. It also offers a nice thing: A debug hook. do_action( 'http_api_debug', $response, 'response', $class, $...


10

How to hide WordPress update mesages CSS The low-tech way to hide something is using css: // Low-tech hiding of update-mesages // source: http://wpsnipp.com/index.php/functions-php/hide-update-nag-within-the-admin/ function remove_upgrade_nag() { echo '<style type="text/css"> .update-nag {display: none} </style>'; ...


10

PHPMailer is not part of the plugin, it is shipped with WordPress. So it is up to WordPress to keep it up to date. There is a patch already in ticket #37210. In the mean time, you can create a mu-plugin, include the newer version of PHPMailer here, create an instance and assign it to the global variable $phpmailer. WordPress will then use that instead of ...


9

Updating this answer the original code below will remove the nag screen but it will ping the server for updates on every load, thanks to @ El Yobo, see update below. This will disable the core updates and the nag screen to everyone but superadmins. add_action( 'after_setup_theme', 'remove_core_updates' ); function remove_core_updates() { if ( ! ...


9

Generally speaking WordPress will update the .htaccess file any time you change the permalink structure. Many plugins will also update/modify the file as needed. But the default structure of the .htaccess file allows you to lay it out in such a way that WordPress will not overwrite your custom entries. WordPress will overwrite the entries between '# BEGIN ...


9

add_action has a priority parameter which is 10 by default, you can increase that to load your function late. Change add_action( 'save_post', 'do_custom_save' ); to add_action( 'save_post', 'do_custom_save', 100 ); Now the priority is to set to 100 and will load quite late and will allow other function associated to load before this function is executed....


8

Based on @kaiser’s useful answer I have written some code that seems to work well. That is the reason why I marked it as The Answer. Let me explain my solution … The logic When a request it sent through the API is runs through WP_Http::request(). That’s the method with … @todo Refactor this code. … in its header. I couldn’t agree more. Now, there are some ...


8

When you update a plugin you just get a new Zip-file containing the whole plugin. You don't get the information which files in that archive changed. That's the reason why all files are overwritten.


8

I use XAMPP myself, but WAMP isn't much different. I'll bet you have not enabled the curl module. WordPress can use other methods (streams and fsockopen) as a fallback, but these may be disabled by default as well in a stock install. Curl is preferred and easy to enable. Close WAMP Go your the \bin\php\version directory in WAMP Edit the php.ini, and ...


8

Navigating WP admin in general tends to trigger multiple external requests, such as fetching news feeds and theme/plugin updates (not counting whatever plugin/themes might be doing on their own). You can put configuration constants into wp-config.php to block external requests completely/partially: define( 'WP_HTTP_BLOCK_EXTERNAL', true ); define( '...


8

You can Disable HTTP Calls by adding this in your wp-config.php define( 'WP_HTTP_BLOCK_EXTERNAL', TRUE ); This will disable/block all external HTTP requests and will make website alot faster. And then you can whitelist domains that you don't want to block. define( 'WP_ACCESSIBLE_HOSTS', 'example.com, domain.com' );


8

You are using a theme or plugin that uses a jQuery-dependent script with poor syntax. In this screenshot below of the browser console of the page you referenced, the expression should be ... li > a[href*='#']. Note the missing quotes around the #. The bug didn't show up until now because WordPress 4.5 updated the version of jQuery it uses. The new jQuery ...


7

For the benefit of others who find this page, I suggest those wishing to provide their own updates outside the official WP repository check out this project on GitHub, that demonstrates the functionality: https://github.com/jeremyclark13/automatic-theme-plugin-update


Only top voted, non community-wiki answers of a minimum length are eligible