Skip to content

Instantly share code, notes, and snippets.

@alancoleman
Last active August 29, 2015 13:57
Show Gist options
  • Save alancoleman/9400570 to your computer and use it in GitHub Desktop.
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)
* 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