Nachox07 / wp-ftp-backup

Function that allows you to upload files inside Wordpress uploads folder to a FTP or CDN with a cron job

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wp-ftp-backup

Script that allows you to upload files inside Wordpress uploads folder to a FTP or CDN with a cron job. Basically this puts all the new files the day which the script is executed. I didnt add any condition like "if file exist" because I wanted more speed.

Usage: php ./wp-ftp-backup.php up

If you want to check if file exist, you can do something like:

if(in_array($my_file, $ftp_file_list))

I recommend to use with a cron job which execute the script everyday at 23:59

You can also add the script output in a log with the following command:

php ./wp-ftp-backup.php up > log.txt

About

Function that allows you to upload files inside Wordpress uploads folder to a FTP or CDN with a cron job

License:The Unlicense


Languages

Language:PHP 100.0%