WordPress Update Script
For all we run our blog on Wordpress know how difficult it can be kept up to date with both security patch. In my case, I have little time to spend blogging as I write and publish articles, not headache-updating and / or patching wordpress.
How can I update my blog at WordPress
In order to make easier the task of updating wordpress wrote a little script for bash, which at first only down the latest version of worpress, a couple of versions later, the script you can create backup directories wp-content, etc..
How does the script update?
Actualizar.wp.sh The script performs the following tasks automatically to update Wordpress to his latest version.
- Create a backup of the Wordpress database.
- Take a backup of the wordpress installation directory.
- All important files (. Htaccess, wp-config, etc.) are copied.
- The latest release of WP is downloaded.
- All files are updated automatically.
As mentioned above, this script has changed a lot since the first version, and I keep adding options gradually suggestions are welcome ![]()
Before performing the update to Wp, I recommend disabling all plugins, I have met with surprise that some new version of WP does not work because some plugin is not compatible.
| file: actualizar.wp.sh v1.01 |
# ATTENTION # Actualizar.WP v 1.01 - February 2008 - Licensed under GPL v3 www.guatewireless.org # This script must run it from the top directory of WordPress. # The main directory where the file wp-config.php # echo This script comes with no warranty and am not responsible for their use, echo you run this script at your own risk and responsibility # First of all we get a copy of the current WordPress echo Creating backup of the installation echo mkdir ----- .. / wp-upgrade-backup / cp-R. .. / wp-upgrade-backup / # Timestamp format for creating directories unix epoch unique back_ts = $ (date +% s) (mkdir $ backup_ back_ts) # Creating the backup of the database echo "Enter the name of the wordpress database (case sensitive) for $ (directories [$ i]): "echo wp_db read" And the user to the database: "read wp_user mysqldump - add-drop-table-u $ (wp_user) -p $ (wp_db)> $ (back_ts backup_) / $ (wp_db). sql # Download the latest release of WP, WP unzip Download WP echo ----- echo wget-O wp.zip http://wordpress. org / latest.zip unzip-d wp.zip wp-upgrade-TEMP / rm wp.zip # Delete the downloaded copy of WP do not need echo ----- echo Deleting innesesarios rm-rf wp-upgrade -TEMP/wordpress/wp-content / wp-upgrade-TEMP/wordpress/index.php # We delete the directory wp-includes and wp-admin and copy existing directories Deleting new echo ----- echo rm-rf wp-includes / mv wp-upgrade-TEMP/wordpress/wp-includes /. rm-rf wp-admin / mv wp-upgrade-TEMP/wordpress/wp-admin /. wp-upgrade-TEMP/wordpress mv / *. # Remove the Deleting Temporary temporary directory echo ----- echo rm-rf wp-upgrade-TEMP / # The End is the begginning, echo is the End Visit on his blog / wp-admin / to run the update script echo |
After installing the latest version of WP, I remind you enter the blog, run the PHP script the upgrade and verify that all plugins, permalinks and issues work.
Popularity: 5%
7 Comments
Trackbacks
- What's New in WordPress 2.5 | Five Horizons
- WordPress 2.5.1 - Fresquesito and Ready to wear | Five Horizons
- Ready to download Wordpress 2.6.2 | Five Horizons






























Hi I would like to use this scrip, but not as I do, you could explain it.
I have a windows shared hosting.
I create the file, upload it by ftp, but not as run it.
Thanks in advance.
Cesar
The script is for linux, not windows.
Hello, I have a blog V.1.5.1.2 it an antique and for carelessness on my part never upgraded. Now I want to encourage it. Your script applies to versions as old as mine? There is a similar plugin called wordpress WPAU. It works the same way? From already thank you for your help.
Greetings,
Daniel
Well if it is old. Well the script is tested with pre 2.x versions, if you receive any error that takes backup of your installation, but I always recommend you take your own backup of your database. But if the WPAU not work in version of wordpress that is your blog.