Skip to content

Latest commit

 

History

History
81 lines (55 loc) · 3.28 KB

README.md

File metadata and controls

81 lines (55 loc) · 3.28 KB

Outdated repository

This project was moved to:

https://github.com/mandrasch/ddev-pull-wp-scripts












ddev-pull-backwpupfile

This providers script will import a backup file created with BackWPup – WordPress Backup Plugin (Open Source) into a DDEV project.

This is an unofficial community script. Thanks you, Inpsyde GmbH, for providing BackWPup as Open Source!

Screencast:

coming soon, see blog post with screenshots: https://matthias-andrasch.eu/blog/2021/import-a-wordpress-site-into-ddev-ddev-pull-backwpupfile/

Features:

  • This DDEV providers script imports database and files from a backwpup .zip-backup
  • The script will automatically replace (migrate) the URLs in database
  • The files import only overrides files which are not tracked by git (using the .gitignore file, see example of wp-content/themes/twentytwentyone-child). This allows you to manage child themes or custom plugins in your git project (and push them to your live site via git-updater or wppusher).
  • Works without SSH access to your webspace (If you have SSH access with rsync and mysqldump available, you can use a more efficient workflow and sync only new files. See rsync.yaml.example, but it needs adaption for WordPress)

Use it

  1. Fork this repository via "Use this template"-button
  2. Clone to your local harddrive
  3. Setup your project with ddev config --project-type=wordpress
  4. ddev start

Import a backup

  1. Create a zip-backup of your site with BackWPup – WordPress Backup Plugin
  2. Download the backup file to this project folder
  3. Rename the .zip file to backup.zip
  4. ddev start
  5. ddev pull backwpupfile
  6. ddev launch

Screencast: coming soon, see blog post with screenshots: https://matthias-andrasch.eu/blog/2021/import-a-wordpress-site-into-ddev-ddev-pull-backwpupfile/

Technical background

See DDEV providers for more information about providers integration. The magic is happening in .ddev/providers/backwpupfile.yaml.

Reset

Remove all changes and reset everything, only git tracked files will be left.

ddev delete -O
git clean -fdx

(You need to run ddev config --project-type=wordpress again if you haven't added .ddev/config.yaml to git.)

TODOs

  • check if git-tracked child theme is really not overriden by import, upload & install child theme on live site
  • refresh permalinks structure if we switch from apache to nginx and vice versa?
  • Test with subdirectory as docroot
  • Test with multiple zip files (large backups)

See as well: