Stand-alone PHP script to compliment Rackspace CDN plugin for Wordpress. Useful if you need to sync a large amount of wordpress uploads and you don't want to re-upload exiting files. Using a standalone script eliminates Apache or nginx + php-fpm timeout issues.
Script is currently BROKEN
- PHP >=5.3.3
- Composer
You must install this through Composer to get dependencies:
# Install Composer
curl -sS https://getcomposer.org/installer | php
# install dependencies
php composer.phar installEither make the script executable...
chmod +x /path/to/file/rackspace-cdn-sync
/path/to/file/rackspace-cdn-sync... or run it with your interpreter ...
bash /path/to/file/rackspace-cdn-syncPlace a settings.ini file (in the same folder as the script) to avoid being prompted for settings each time.
Here are some sample contents of the settings.ini file:
[api]
key=e62435243534574567456887878c6
username=theusername
container=mycontainername
region=DFW
id_endpoint=US
;id_endpoint=UK
[files]
path=/path/to/existing/files
[mysql]
host=localhost
database=wp_db_name
username=user_with_rw
password=xxx