Changes

Jump to navigation Jump to search
Then install and use Velvet Blues (see https://www.wpbeginner.com/plugins/how-to-update-urls-when-moving-your-wordpress-site/) and use it to change the URLs (use https:// as a page inspection shows that this is correct)
 
===Another Change to the Wordpress URL and some updates ===
 
As root get the mysql dbase details:
mysql -p #hint: tsn
select host, user from mysql.user;
show databases;
 
Read mail:
less /var/mail/$(whoami)
 
Look in wp-config.php for dbase, user, pword etc.
cat /var/www/html/journal/wp-config.php
 
Back up the dbase
mysqldump --add-drop-table -h localhost -u root -p wordpress > wordpress-20220814.sql
 
Change settings (on https://www.edegan.com/journal/wp-admin/options-general.php)
* WordPress Address (URL)
** https://www.edegan.com/articles
* Site Address (URL)
** https://www.edegan.com/articles
 
Move the folder:
cd /var/www/html/
mv journal articles
 
Reload:
https://www.edegan.com/articles/wp-admin/options-general.php?
 
Fix the .htaccess file to do the permalinks
cd articles
vi .htaccess
#change 2 instances of journal to articles
 
Fix the links in the menu on https://www.edegan.com/articles/wp-admin/customize.php?
* Change links in menus! (2 instances - then publish)
 
Upgrade php to 7.4
sudo apt-add-repository ppa:ondrej/php
apt update
apt install -y php7.4 php7.4-cli php7.4-common php7.4-fpm
apt install -y php7.4-mysql php7.4-dom php7.4-simplexml php7.4-ssh2 php7.4-xml php7.4-xmlreader php7.4-curl php7.4-exif php7.4-ftp php7.4-gd php7.4-iconv php7.4-imagick php7.4-json php7.4-mbstring php7.4-posix php7.4-sockets php7.4-tokenizer
apt install -y php7.4-mysqli php7.4-pdo php7.4-sqlite3 php7.4-ctype php7.4-fileinfo php7.4-zip php7.4-exif
a2dismod php7.3
a2enmod php7.4
a2enmod proxy_fcgi setenvif
a2enconf php7.4-fpm
systemctl reload apache2
Update wordpress
* Note that I have wordpress chown -R root:root for articles and then www-data:www-data for wp-content.
* Didn't read: https://www.edegan.com/articles/wp-admin/update-core.php?action=do-core-upgrade
 
Do the update
/var/www/html# chown -R www-data:www-data articles/
run update in wp-admin
* Update all the plugins
* Update themes
* Wordfence
** Update .htaccess for extended protection.
 
Reharden:
chown -R root:root articles/
chown -R www-data:www-data articles/wp-content/
 
Fix the alias in apache!
vi /etc/apache2/sites-available/edegan.com.conf
Alias /journal /var/www/html/articles
Alias /articles /var/www/html/article
Alias /blog /var/www/html/blog
RewriteRule ^/*$ %{DOCUMENT_ROOT}/articles/index.php [L]
#Redirect the journal root to articles
Redirect permanent /journal https://www.edegan.com/articles
systemctl reload apache2
 
Plugins etc.
* Site Kit by Google
** Setup! (sign in using dredegan@gmail.com)
* Yoast SEO
** Rerun optimization
Fix image links, etc.
* I repointed the /journal and /blog aliases
* Run the velvet blues plugin
 
Fix the icon:
* https://www.edegan.com/articles/wp-content/uploads/2021/02/edegandotcomslashjournal-LightGreyOnDarkBlue.png
* In Z:\projects\WebDesign\LogosV2.xcf
* Export as edegandotcomslasharticles-LightGreyOnDarkBlue.png
* Set under Site Identity
===Useful tools===

Navigation menu