home
clear breadcrumbs
search
login
 
wordpress notes
0 1 * * * /home/pete/wp/wp.sh # * * * * * /home/pete/wp/wp.sh usermod -a -G www-data pete SHOW DATABASES; delete database: DROP DATABASE wordpress; create the database: CREATE DATABASE wordpress; view users: SELECT User, Host FROM mysql.user; user privileges: SHOW GRANTS FOR 'wordpress'@'localhost'; remove user: DROP USER 'user'@'host'; create super user: GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost' WITH GRANT OPTION; create user: CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpress@2021'; USE wordpress; GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost'; GRANT ALL PRIVILEGES ON multisite.* TO 'wordpress'@'localhost'; FLUSH PRIVILEGES; sudo mkdir /var/www/ sudo chown -R www-data:www-data /var/www/wordpress sudo chmod -R 755 /var/www/wordpress digital ocean wordpress add new site: create the sites-available conf sudo nano /etc/apache2/sites-available/camping.conf create new certificate for domain add the site in wp then go back and change the address issue with blocked cookies add to config: define('ADMIN_COOKIE_PATH', '/'); define('COOKIE_DOMAIN', ''); define('COOKIEPATH', ''); define('SITECOOKIEPATH', ''); sudo nano /etc/apache2/sites-available/wordpress.conf
ServerAdmin peteolson3150@gmail.com ServerName wordpress.peteolson.me ServerAlias www.wordpress.peteolson.me DocumentRoot /var/www/wordpress ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
ServerAdmin peteolson3150@gmail.com ServerName wordpress.peteolson.me DocumentRoot /var/www/wordpress ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
sudo a2ensite woodworking.conf sudo apache2ctl configtest sudo systemctl restart apache2 sudo certbot delete sudo certbot --apache export mysql database: mysqldump --user=wordpress --password=wordpress@2021 --default-character-set=utf8 --single-transaction wordpress > mysqldump.txt import an exported database: mysql -uwordpress -pwordpress@2021 wordpress < mysqldump.txt HOST='ftp.peteolson.me' USER='pete' PASSWD='polarbear' FILE=$date-$site.gz.gpg ftp -n -v -p $HOST << EOT ascii user $USER $PASSWD prompt cd backup put $FILE bye EOT # rm $date-$site.gz.gpg SINGLE SITE: point dns to ip address create directory create virtual host create ssl cert create database create user with privileges for database copy wordpress, themes and plugins edit wp-config.php update backup script