WordPress - KeynesYouDigIt/Knowledge GitHub Wiki
To setup Wordpress:
mysql -u root -pcreate database wordpressdb;create user 'wpuser'@'localhost' identified by 'wordpress-pw';grant all privileges on wordpressdb.* to 'wpuser'@'localhost';flush privileges;exitwget https://wordpress.org/latest.tar.gztar xzf latest.tar.gzcd wordpresscp wp-config-sample.php wp-config.phpvim wp-config.phpwordpressdbwpuserwordpress-pw- Copy/paste the salts from the wordpress site into the config file
sudo rm /var/www/html/index.htmlcp -r * /var/www/htmlhttps://my-public-dns.com/wp-admin/install.php
Migrating to RDS
- Dump your database:
mysqldump -u wpuser -p wordpressdb > /home/ubuntu/backup.sql - Create an RDS instance
- Username/password must match!
- Upload your dump
- SSH to EC2, use the URL for your database
mysql -u wpuser -p --database=wordpressdb --host=db.some-address.com < backup.sql
- Change
DB_HOSTto new RDS URL