Moving to a new home!

This blog has been hosted on a cheap, low end VM for years. 1vCPU with a gig of RAM. WordPress is kinda a pig, and it would sometimes run out of RAM and crash. The price of the VM has been creeping up and I finally shopped around to find a new host, which is who is serving this. I now have 2vCPUs ans 4 gigs of RAM. Data bandwidth feels way faster, however, I’ll admit to never actually measuring it.

First, we need to setup the VM. Debian 13 just came out and it’s not available yet from my VM vendor, so let’s start with Debian 12 and upgrade.

adduser foo
sudo visudo
apt-update, apt-upgrade
sudo sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
apt-update, apt-upgrade (again)
apt full-upgrade
sudo shutdown -r now
sudo apt modernize-sources
sudo apt --purge autoremove
sudo apt autoclean

Now we need to put a WordPress environment together.
sudo apt install mariadb-server apache2 php fastfetch screen htop unzip php-mysql php-curl php-imagick php-zip php-mbstring php-intl php-dom php-redis redis-server certbot python3-certbot-apache
sudo systemctl enable apache2 && sudo systemctl start apache2
sudo systemctl start mariadb && sudo systemctl enable mariadb
sudo mariadb-secure-installation
sudo a2enmod rewrite
sudo systemctl restart apache2

Setup database
mariadb -u root -p
CREATE USER foo@localhost IDENTIFIED BY 'hackme';
CREATE DATABASE foobar;
GRANT ALL PRIVILEGES ON foobar.* TO foo@localhost;
FLUSH PRIVILEGES;

WordPress stuff
wget https://wordpress.org/latest.zip
unzip latest.zip
sudo chown -R www-data:www-data wordpress

Add the following to your wp-config.php, not really sure if you need this.
define( ‘WP_MEMORY_LIMIT’, ‘512M’ );
set_time_limit(900);

enable mod rewrite

Migration, tar /etc/apache2 and scp it to new host. Move config files over and enable sites
sudo a2ensite
systemctl reload apache2

Get HTTPS certs
certbot –apache