Giter Club home page Giter Club logo

wp-backup's Introduction

wp-backup

Requirements

  • WP-CLI
  • Bash
  • Crontab

How it works

This shell script creates the directory wp-backup/, and makes the zip file that includes plugins/ themes/ uploads/ wordpress.sql(Exported mysql data).You can set the maximum number of zip files. This script will delete oldest zip file when file's number reaches the limit.

Also, it will updates WordPres's core, plugins, themes, language file.

How to use

  1. Please place wp-backup.sh at under your WordPress directory.
  2. Set BACKUP_NUM that is Maximum number of backup files. Also change BASE_DIR to your WordPres's path.
  3. Set crontab to schedule of backup.

Description of Crontab

Fomula

*     *     *     *     *  command to be executed
-     -     -     -     -
|     |     |     |     |
|     |     |     |     +----- day of week (0 - 6) (Sunday=0)
|     |     |     +------- month (1 - 12)
|     |     +--------- day of month (1 - 31)
|     +----------- hour (0 - 23)
+------------- min (0 - 59)

https://help.ubuntu.com/community/CronHowto

Create schedule of task.

$ crontab -e
00 05 * * * ~/apps/wordpress/cron/wp-backup.sh

See the tasks that have already created.

$ crontab -l
00 05 * * * ~/apps/wordpress/cron/wp-backup.sh

wp-backup's People

Contributors

naogify avatar

Stargazers

Yousan_O avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.