WordPress - KeynesYouDigIt/Knowledge GitHub Wiki
To setup Wordpress:
mysql -u root -p
create database wordpressdb;
create user 'wpuser'@'localhost' identified by 'wordpress-pw';
grant all privileges on wordpressdb.* to 'wpuser'@'localhost'
;flush privileges;
exit
wget https://wordpress.org/latest.tar.gz
tar xzf latest.tar.gz
cd wordpress
cp wp-config-sample.php wp-config.php
vim wp-config.php
wordpressdb
wpuser
wordpress-pw
- Copy/paste the salts from the wordpress site into the config file
sudo rm /var/www/html/index.html
cp -r * /var/www/html
https://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_HOST
to new RDS URL