This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 7z e hda.img # Use p7zip to extract partitions as images 0.img, 1.img, etc | |
| 7z l 0.img boot # List files in boot to find name of initrd | |
| 7z e 0.img boot/initrd.img-4.9.0-13-4kc-malta |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| read -r -p "Would you really like to reset your development database and pull the latest from production? [y/N] " response | |
| if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then | |
| wp @development db reset --yes && | |
| wp @production db export - > sql-dump-production.sql && | |
| wp @development db import sql-dump-production.sql && | |
| wp @development search-replace https://example.com https://example.dev | |
| fi |