Web Hosting
I know what my web host was doing. It was loading up so many people on its servers that some of the computer services (PHP/MySQl) were suffering. Otherwise, it wasn't bad. It offered the features I needed. It had Softaculous with hundreds of one-click installs. The service wasn't bad. They got back to me pretty quickly on issues. So I was relatively happy except for that darn speed thing. Speed was wrecking everything.
Well, move! Maybe, but that's going to involve pain and probably more expense. Are there other options?
I was wondering how long it would take to open my website page? I pressed the button to load the address and started counting until the page came up: 5 seconds, 10 seconds, 30 seconds, 1 minute. It took about one minute for the WordPress page to come up. It only has a handful of pages in the entire site, yet it takes a whole minute to load. That was it for me. I had had enough. That started my journey to find a solution.
What I did know was that a simple HTML/JavaScript page takes about 1 to 2 seconds to load. Entirely acceptable. My WordPress (PHP/MySQL) pages take from 5 seconds to 1 minutes to load. Even the 5-second load time is unacceptable. The preferred solution seemed clear, dump WordPress, PHP and MySQL and move to HTML/Javascript webpages. In other words, move into babyland - website builders. Aren't website builders for babies? I guess I wanted to be a baby too. But there is a big problem with the whole website builder thing, website builders force hosting on you. You can't just build a website and host it anywhere. You have to go with them. But what if I don't want to go with them? Too bad. Well, no. That was not going to fly. Website builders were out for me.
What about flat file CMSs? They solve the MySQL problem but not the PHP problem. Still, I was willing to give them a shot. Almost all of them had the same problems - terrible output and more difficult to use than WordPress. They just didn't have many options for themes, except for one - GRAV CMS . GRAV is free and uses flat files, but there is a learning curve. It does have many theme options which is a big plus. You write in a simple markdown language that is easy to learn. I was able to make a few theme changes to get a website looking pretty good. And it was pretty fast at about 2 to 3 seconds for load time. GRAV CMS was going to work for me, but then I stumbled onto Nicepage .
Nicepage is a desktop website builder with a one-time fee - currently at $59 for a personal version that allows up to 5 sites. It produces webpages in HTML/Javascript. Load times are around 1 to 2 seconds. Although I did have to independently compress the Nicepage.css file using PurifyCSS.Online. It's actually pretty easy to learn how to use Nicepage. You can start off with a blank page or choose from hundreds of premade templates. A page is divided into blocks and blocks are divided into elements. This methodology facilitates viewing on different devices, like mobile and desktop. You can adjust the elements for viewing on different devices. Overall, I was able to get something pretty good relatively quickly. Then you just export to HTML/Javascript and upload to your website domain. And suddenly you have superfast load times.
What is a blog? Isn't it just a bunch of independent pages tied together at one page? On that one page you have a thumbnail and snippet or summary for each article. The blog concept is pretty easy to do in HTML. You can do it manually, like I do or you can have Nicepage do it for it. Manually means more control.
I had one weird problem when I wanted to use my own URL shortening service for links on my pages. I bought a script (Linkity ) over at Code Canyon for $15. The install was super easy as it uses SQLite instead of MySQL. SQLite is a small personal database engine that resides in your own folder. But I ran into a problem - redirects take 5 to 10 seconds. Then I got this ultra-simple redirect script with only 10 lines of PHP code (mini-script) and one text file. It took 5 to 10 seconds for a redirect too. So annoying. Anyway, after several hours of research I found that each time a function called header() is called in PHP it must be "immediately" followed by die() or exit(). You can get this script here , but it still isn't good enough.
I created another URL shortening program using .htaccess. Now I'm finally getting some speed. You can get it
here
. An even faster one for htaccess you can get
here
. Just more confirmation that getting away from PHP helps to turn a mediocre webhost into a much better one.
Simply trying to deal with URL shortening caused me to move from shared hosting to VPS hosting at the same cost. This fixed my slow PHP/MySQL problem at the cost of learning how to be a Linux administrator.