https://github.com/tareq1988/forge-utils
Utility script to backup and restore WordPress sites in Laravel Forge
https://github.com/tareq1988/forge-utils
backup bash-script forge laravel-forge mysql restore wordpress
Last synced: 3 months ago
JSON representation
Utility script to backup and restore WordPress sites in Laravel Forge
- Host: GitHub
- URL: https://github.com/tareq1988/forge-utils
- Owner: tareq1988
- Created: 2021-09-14T10:58:13.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-16T08:59:59.000Z (almost 5 years ago)
- Last Synced: 2025-02-10T08:28:49.703Z (over 1 year ago)
- Topics: backup, bash-script, forge, laravel-forge, mysql, restore, wordpress
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Forge Utils
Makes easy to download a full WordPress site from a [Forge](https://forge.laravel.com/), and restore the site, maybe to another server.
## Installation
Clone the repository to a suitable directory.
```sh
cd ~/Downloads
git clone git@github.com:tareq1988/forge-utils.git
```
### Symlink the scripts
To easily access the scripts from anywhere, you need to symlink the scripts.
Create the `~/bin` folder if not exists, and make sure you have the `~/bin` in your `$PATH`.
```bash
ln -s ~/Downloads/forge-utils/wp-backup-to-local.sh ~/bin/forge-wp-to-local
ln -s ~/Downloads/forge-utils/wp-restore-remote.sh ~/bin/forge-wp-restore
```
## Usage
### Backup
```bash
forge-wp-to-local
# Example
forge-wp-to-local forge 174.138.25.55 wpexample.com
```
To take a backup, enter to your preffered directory in your machine. It'll create a directory automatically with your domain name inside it.
### Restore
```bash
forge-wp-restore
# Example
forge-wp-restore forge 174.138.25.55 wpexample.com
```
To restore the backup, enter to your directory where your backup folder exists. It has to be the parent folder of your `wpexample.com` backup.