![]() |
This plugin WAS working before.. I played around with some of the code too much and now it doesnt work. )=
I simply need the SAME functionality that "Amazon S3 Plugin" offers. Anything that I upload, is backed up onto my S3 account. Now I need to expand on that idea and ALSO have a mirror/backup plugin to a custom backup domain. ( http://backup-domain.com/backups/... )
(plugin not working)
This is what I have as a plugin right now:
----------- On my OTHER domain.. I have this in a folder (chmodd "777"): Solution - 1I've got it working beautifully now on my test environment... Here's the revised/fixed code for the plugin: And here's the code for the accompanying 'helper' file that downloads the uploads on the remote server: Put the helper file at the root of where the backed up files should be stored. For example, if you're trying to mirror the files from one Wordpress installation to another, the place to put the helper file is /wp-content/uploads/ because that is the base directory for the uploaded content. This may be obvious, but you'll have to activate the "Automatic Upload Mirror" plugin in the wordpress admin and also configure the location of your remote web server's helper file in the "Automatic Upload Mirror" area under "Settings" in the admin. If you put the helper file (let's say it's called backup-mirror.php) in /wp-content/uploads/ on your wordpress install and your domain is www.mydomain.com, enter this in the "Path to filedump script #1" field in the plugin settings: http://www.mydomain.com/wp-content/uploads/backup-mirror.php If you prefer to put the helper file in another location you can modify this line in the helper script above: $dir = dirname(__FILE__); If you want to put the script in the root folder of the Wordpress install for example, change the above line to: $dir = dirname(__FILE__).'/wp-content/uploads'; And then update the plugin settings to: http://www.mydomain.com/backup-mirror.php Let me know if you have any problems with this code or any questions! Thanks, Jonah Solution - 2Can you post a working copy of the plugin, before you modified it? Solution - 3Why in gods name would you use curl to move a file?? |
Wordpress |
Type: | Code Example |
Category: | Coding |
Sub Category: | Code Example |
Uploaded by: | Admin |
Views: | 9 |