Categories
Uncategorised

Making a WordPress server

My Wife wanted a blogging site to try, so I had the choice of setting up my own server or signing up to an online provider.

I first looked at setting it myself, and after doing the sums, I calculated it was going to cost me roughly $10/month in electricity to run a computer to host it, all the time to maintain it, the learning curve to set it up and the pain of trying to work behind a public IP address that changes every couple of days.

This compared to $6/month for hosting with Bluehost, which specializes in hosting blogs with WordPress, so it was a no-brainer. I would host it myself.

This is a rambling instruction on how I got this site working. (Or half working at least)

I have a friend who recommended turnkey WordPress as the platform I serve off, as it is a pre configured solution and to run it as a VM along side of a firewall. I used Ubuntu as the host system as Hyper-V’s system requirements were far to higher for any of the hardware I had lying around.

I used these sites to install my VM https://www.digitalocean.com/community/tutorials/how-to-install-webmin-on-ubuntu-18-04 https://help.ubuntu.com/community/KVM/Installation

I was going to use a firewall called smoothwall http://www.smoothwall.org/about/express-feature-list/ Mods for smoothwall https://community.smoothwall.org/forum/viewtopic.php?f=109&t=41202

Network bridge stuff if I installed smoothwall https://unix.stackexchange.com/questions/519351/how-to-set-up-functional-private-network-bridge-on-qemu-kvm https://www.linux-kvm.org/page/Networking#Private_Virtual_Bridge

I referenced these sites too https://www.dedoimedo.com/computers/kvm-bridged.html https://virt.kernelnewbies.org/MacVTap https://unix.stackexchange.com/questions/519351/how-to-set-up-functional-private-network-bridge-on-qemu-kvm

I needed a multisite so these were the sites I followed https://wordpress.org/support/article/create-a-network/ This is specific to turnkey WordPress https://www.turnkeylinux.org/docs/wordpress/multisite https://www.wpbeginner.com/wp-tutorials/how-to-install-and-setup-wordpress-multisite-network/ https://wordpress.org/support/topic/which-is-the-correct-way-to-use-wordpress-multisite-with-different-domain-names/ https://wordpress.org/support/article/wordpress-multisite-domain-mapping/

I wanted a shorter username than the 4 characters imposed by WP defaults so I just added a this code found here to the plugins folder https://wordpress.stackexchange.com/questions/59760/changing-the-username-character-limit-from-four-to-less-characters . I tried using this as a plugin but it didn’t seem to work https://wordpress.org/plugins/wpum-username-length/

Cookie problems https://wordpress.stackexchange.com/questions/259839/cookies-in-multisite-where-network-sites-have-their-own-domain-name

To fix the Dynamic DHCP of my internet connection, I forwarded the name server to Cloudflare so I could use this python script to update the ip address every time it is renewed https://pypi.org/project/cloudflare-ddns/ I then set up a CRON job in webmin for the script to run every hour. I also used this site for pip3 installation guidance https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-debian-8 I used this site to brush up on shell scripts for the cron jobs (I am planning on getting it to check the ip address once rather than setting it 6 times) http://www.tldp.org/LDP/Bash-Beginners-Guide/html/sect_01_05.html#sect_01_05_01

Something changed after the install and I was no longer able to edit posts, then I came across a comment here that said changing the URL fixed the problem, and after adding www., it worked.
https://wpmantis.com/wordpress-editor-updating-failed-solved/ post was by Heather
https://mckaysphotography.com/
I just need to find the real problem and so the solution so I can keep my website without the www. The real problem as it turns out was I just needed to delete the cache in the web browser.

During setup there is a file that needs modification called .htaccess, which I downloaded to my Mac from webmin, updated it in text edit, then uploaded it again. Turns out my Mac was removing the period from before the file name so WordPress was not reading the new settings. I changed the file name from webmin and added the period to fix the problem.

I was getting “garbage” text in Internet Explorer and this seems to have the fix by modifying the .htaccess file https://blog.templatetoaster.com/wordpress-htaccess-file-guide/

Domain mapping https://wordpress.org/support/topic/domain-and-directory-mapping-for-different-multisite-sites/

WP greyed out address https://www.turnkeylinux.org/forum/support/20120422/wordpress-vm-both-address-and-site-url-are-gray https://themeskills.com/edit-site-wordpress-address-url-grayed-out/

Security fixes https://www.wp-tweaks.com/hackers-can-find-your-wordpress-username/

Add navigation menus https://www.wpbeginner.com/beginners-guide/how-to-add-navigation-menu-in-wordpress-beginners-guide/

Change WP URL https://www.wpbeginner.com/wp-tutorials/how-to-change-your-wordpress-site-urls-step-by-step/

Mail server https://www.ubuntupit.com/best-linux-mail-server-software-and-solutions/ http://www.securityspace.com/s_survey/data/man.202004/mxsurvey.html https://www.globo.tech/learning-center/exim-mail-server-u17/

More to come……..

By David Dobson

I try not to let my age dictate how old I act

One reply on “Making a WordPress server”

Leave a Reply

Your email address will not be published. Required fields are marked *