Last active
August 29, 2015 13:57
-
-
Save alancoleman/9400570 to your computer and use it in GitHub Desktop.
Various shell commands used to move WordPress installs to a new server (Linode VPS)
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
* Use rsync to move files from old server to local, run from local machine | |
rsync -chavzP --stats [email protected]:/home/alancoleman/domains /home/alan/Documents/domain_files | |
* Use wget to download the latest copy of WordPress | |
wget http://wordpress.org/latest.tar.gz | |
* Unpack WordPress download | |
tar -zxvf latest.tar.gz | |
* Move fresh WordPress files to /public directory | |
cp -R src/wordpress/* public | |
* Change permissions of public directory for install purposes | |
chmod 777 public | |
* Change them back again | |
chmod 775 public | |
* Add a database user in mysql | |
grant all on database to 'user' identified by 'password'; | |
* Import data into a database, run from directory containing file | |
mysql -p -u user database < file.sql | |
* grant privileges to a user | |
GRANT ALL ON database.* TO 'user'@'localhost'; | |
* show user priviedges | |
SHOW GRANTS FOR 'user'@'localhost | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment