I have several local WordPress dev environments but, for the moment, a very very slow internet connection. The WordPress auto updater for core is very convenient, but would it possible for it to use update packages from localhost instead of downloading it for every site?
A list of options, easier ones first.
Run WordPress as a multisite network, you can find instructions here: http://codex.wordpress.org/Create_A_Network
Manually apply changes via .zip file and overwriting.
- Download latest zip from wordpress.org
- Make a backup of your file base per install
- Unpack the zip files then overwrite files in
- Overwrite root files but make sure you do not change your
wp-config.phpsettings. It's best to compare the new wp-config for any changes that might have been made so you can apply them.
wp-contentfor any new changes and apply them (do not overwrite your existing files)
Using Symbolic Links, this isn't easy will probably break stuff.
I was having the same problem, my Wordpress installation couldn't download the necessary update files fast enough. I could see that in
wp-content/tmp the .tmp-files were created and growing, but they all stopped early and Wordpress tried downloading again and again. Of course, your Wordpress-installation might use a different tempdir. If you're unsure, just add the following line to your wp-config.php to make sure that the tempdir is exactly what you expect:
define('WP_TEMP_DIR', ABSPATH . 'wp-content/tmp');
I know that the question is rather old, but as I couldn't find any better solution in the web and I did resolve this issue, I thought the next one who has similar problems would be grateful to find the answer here.
Here's what you have to do:
- Download the update manually and upload it to the server into the directory
Modify the file
wp-admin/includes/file.phpby adding these five lines to the
function download_url, right before the line with the call to
$parts = parse_url($url); if ( empty($dir) ) $dir = get_temp_dir(); if (file_exists($dir . $parts['path'])) return $dir . $parts['path'];
Run the "Automatic Update" from your dashboard.
Please keep these things in mind:
- The file that you stored into the
wp-content/tmpwill be deleted after the upgrade.
- The changes to file.php will disappear as the upgrade normally overwrites file.php
How does this work?
We extract the filename from the URL that Wordpress is trying to download (
$parts['path'] is the filename). If the file resides in the tempdir, simply return with this filename rather than with a temporary filename.