INSERT INTO wp_users SELECT * FROM gaiapolewp.gp_users;
INSERT INTO wp_usermeta SELECT * FROM gaiapolewp.gp_usermeta;
DELETE FROM wp_terms;
INSERT INTO wp_terms SELECT * FROM gaiapolewp.gp_terms;
DELETE FROM wp_term_relationships;
INSERT INTO wp_term_relationships SELECT * FROM gaiapolewp.gp_term_relationships;
DELETE FROM wp_term_taxonomy;
INSERT INTO wp_term_taxonomy SELECT * FROM gaiapolewp.gp_term_taxonomy;
DELETE FROM wp_posts;
INSERT INTO wp_posts
SELECT ID
, post_author
, post_date
, post_date
, post_content
, post_title
, post_excerpt
, post_status
, comment_status
, ping_status
, post_password
, post_name
, to_ping
, pinged
, post_modified
, post_modified
, post_content_filtered
, post_parent
, guid
, menu_order
, post_type
, post_mime_type
, comment_count
FROM gaiapolewp.gp_posts;
DELETE FROM wp_postmeta;
INSERT INTO wp_postmeta SELECT * FROM gaiapolewp.gp_postmeta;
DELETE FROM wp_comments;
INSERT INTO wp_comments SELECT * FROM gaiapolewp.gp_comments;
DELETE FROM wp_commentmeta;
INSERT INTO wp_commentmeta SELECT * FROM gaiapolewp.gp_commentmeta;
mysql -u root -p
mysql -p -u root gaiapolewp < gaiapolewp.sql
DROP DATABASE IF EXISTS gaiapolewp;
CREATE DATABASE gaiapolewp;
USE gaiapolewp;
SHOW TABLES;
SELECT DATE(post_date), COUNT(1) FROM gp_posts WHERE DATE(post_date) >= '2018-08-01' GROUP BY DATE
(post_date);
SELECT DATE_FORMAT(post_date, '%Y-%m'), COUNT(1) FROM gp_posts GROUP BY DATE_FORMAT(post_date, '%
Y-%m');
# Change the permission of .pem certificate so only the root user can read it
chmod 400 LightsailDefaultPrivateKey-us-east-1.pem ;
cp LightsailDefaultPrivateKey-us-east-1.pem ~/.ssh ;
# Connect to LigthSail via SSH
ssh -i ~/.ssh/LightsailDefaultPrivateKey-us-east-1.pem bitnami@34.200.244.131 ;
# Send file LightSail via SCP
scp -i ~/.ssh/LightsailDefaultPrivateKey-us-east-1.pem backup-9.5.2018_09-40-41_gaiapole.tar.gz bitnami@34.200.244.131:~ ;