Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Keeping Your Test Blog Up-to-date

I believe that the following script will valuable to testers who are not using
SVN, yet wish to have the most recent version of WordPress installed on their
server. This does not involve any manual intervention.

Put install_nightly.sh in your home directory and make it a cron job.

==== install_nightly.sh ====
#!/bin/bash

cd /home/<username>/tmp   # need full path for cron
wget http://wordpress.org/download/nightly-builds/wordpress-`date
+%Y-%m-%d`.tar.gz
gunzip wordpress-`date +%Y-%m-%d`.tar.gz
tar xf wordpress-`date +%Y-%m-%d`.tar # uncompress and untar
cp -rf wordpress ~/public_html/<your_wordpress_dir> # overwrite old files
rm -rf wordpress # clean up
rm /home/<username>/public_html/<your_wordpress_dir>/wp-admin/install* # secure
===

Cron job should be set to run after the nightly version was made available.
Alternatively, you can get yesterday's nightly by replacing:

   `date +%Y-%m-%d`

with:

   `date -d "1 day ago" +%Y-%m-%d`

The above script:

  * needs to specify username for your home directory to be accessed
  * needs your WordPress installation dir/path

Hope this helps someone...

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index