Hot answers tagged

125

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'


112

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


41

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($...


31

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 ...


27

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


24

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/...


23

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&...


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 ...


19

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 ...


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-...


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', '...


12

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 ); ...


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 ...


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

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

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....


9

Adding these two lines to "wp-config.php" worked for me. I had the same issue. define( 'CONCATENATE_SCRIPTS', false ); define( 'SCRIPT_DEBUG', true ); Also, remember to clear cache on server and browser.


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

I created a command line Phing script for this, it's nothing special other than loading an external script to run. The reason I used it via the CLI is because: I don't want it to load by mistake (need to type a command) It's secure since it can be run outside the web root, in other words it can effect WP but WP cannot reach the script in any way. It does ...


8

i just wanted know that how can i update the plugin without overwrite the my previous custom code. You don't. Well, you do the same thing over and over and over again every time you want to update. Download the plugin. Hack your changes into it. Upload to your site. Repeat. Which is why you don't edit plugins that you didn't write and don't maintain. ...


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 ...


8

Add this code to any plugin or your theme's functions.php file. Remember to remove it when you're done to prevent flicking your database for no reason. delete_option( "core_updater.lock" );


7

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);


7

I don't know if this will help or not, but worth a try. Create a Must Use plugin and drop this lines, see code comments: <?php /* Plugin Name: Network upgrade exception */ // Run only in the Upgrade screen add_action( 'load-upgrade.php', 'add_filter_wpse_115279' ); function add_filter_wpse_115279() { add_filter( 'http_request_args', '...


7

Ok - here is a method - thanks to @Rarst for pointing me in the right direction. Include the require file if the plugins_api function is not found: if ( ! function_exists( 'plugins_api' ) ) { require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); } Then, prepare a query to pass to plugins_api(): // set the arguments to get latest info ...


7

From my perspective there are two issues with your plan - Git and "conventional" structure. So basically everything. :) Git (and version control in general) is a poor tool for whole site stacks. Been there, done that, it hurt a lot. What you call an "unconventional" structure with content separated from core has been a very conventional and robust choice ...


7

quick-and-dirty hint to solve this problem: find the function list_translation_updates() in wp-admin/update-core.php $updates = wp_get_translation_updates(); if ( ! $updates ) <- locate the if ... } else { <- add this print_r ( $updates ); } add the else-case and save the file reload the dashboard page ...


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