Migrate WordPress Blog

I wanted to move my WordPress blog to my Openmediavault server to consolidate my hardware. It use to be that I have this blog on a standalone FreeBSD box.

So what did I do to make this happen? Here are the high level steps that I did.

  1. Prepare the VM.
  2. Move the data.
  3. Run the App.
  • Openmediavault is able to run Docker and also KVM.

I decided to use KVM because I wanted familiarity and I have not have a lot of experience with docker containers. However, I was also successful in migrating my other applications into docker containers ( more on this to follow.)

  • Migrate the data.

I did a database export and copied over my /usr/local/etc and /usr/local/www folders. I imported the data using the mariadb commandline since I have not setup PhpMyAdmin yet. I encountered a snag on the import. It seems that my database will not import unless I did an individual export of the databases. Something to do with the database user conflicts. Another thing with the import is that I have to redo the database users. I had to drop the users, create user, grant privileges, and finally flush privileges.

The configs I had to check the users and groups as well as the root folder (www) and the wp-content.

  • Run the app.

It would have been simpler if I just setup the server the same way. But, I decided to add an NGINX reverse proxy into the mix. I am able to make it work somewhat but ran into an issue when logging into the app.

this is the error I got:

fatal error: uncaught error: call to undefined function ctype_digit() in /usr/local/www/wordpress/wp-content/plugins/jetpack/vendor/automattic/jetpack-connection/legacy/class-jetpack-signature.php:244 stack trace: #0 /usr/local/www/wordpress/wp-content/plugins/jetpack/vendor/automattic/jetpack-connection/src/class-client.php(136): jetpack_signature->sign_request('i9a$fqo@pwxac&o…', 1578694208, 'ldozcjbmxi', 'vbvvpd3yni1/f2m…', 'post', 'https://jetpack…', 'query('jetpack.sso.req…') #3 /usr/local/www/wordpress/wp-content/plugins/jetpack/modules/sso.php(409): jetpack_sso::request_initial_nonce() #4 /usr/local/www/wordpress/wp-content/plugins/jetpack/modules/sso.php(392): jetpack_sso- in /usr/local/www/wordpress/wp-content/plugins/jetpack/vendor/automattic/jetpack-connection/legacy/class-jetpack-signature.php on line 244

I googled for days but I could never find any solution on the net. I finally decided to try to uninstall the Jetpack plugin. I had to go to wordpress.com and disconnect my blog. Once , I did that I was able to login. I then was able to update WordPress and re-enable the jetpack plugin. Booyah!!!

Moving to #Freebsd ?

I am thinking of moving my main server to FreeBSD. My main goal is to learn the OS. I have gotten so use to Debian and It seems like it is no longer a challenge to me. At least I think with #FreeBSD, I do not have to worry so much with upgrading. Right now, since I track Debian Unstable, I have to constantly update when I am in there. Also I also have to update the kernel. All of this I know are avoidable. I could just go with Debian stable and I could just choose to use the distro kernel and not have to worry with compiling the kernel.

Anyway, I think this would be a huge undertaking. I probably would have to plan this in stages. For one, how do I migrate without significant downtime???

 

FreeBSD upgrades

freebsd

I am upgrading my one and only FreeBSD box. I don’t use FreeBSD much but I was thinking of installing LDAP and Kerberos on that  box. When I did the freebsd-update script I ran into some problems. It turns out I am missing some directories. I don’t know if this is a bug or this is purposely done to make us create our own directory. I guess I am spoiled by apt-get in Debian where everything happens automatically. I kinda like it because it forces me to learn. I am looking forward to more adventures in FreeBSD land!

portupgrade