It (still) works!

I just did what might have been major surgery on this website’s database. Successfully.

When I first set up this web page, I could only have five SQL Databases. Now they upped it to 100. I’ll never use that many, but it’s nice to not have to conserve them any more.

When I started this and the WNYPODCAST site, I made them share the same database. It was easy to do, they just had different table prefixes. But if anything ever happened to that database, both sites would go down.

Messing with SQL Databases is not for the faint-of-heart. I know almost nothing about SQL and there is no way I would try to write any code that worked directly on it. It’s a whole subject in it’s own, one that I may someday try to learn, but today, it’s greek to me.

Fortunately, the program that runs the website, was written by people who do know how to make it work. And setting up and creating the empty database is pretty simple. It’s done by another program written by people who understand that too. All you do is log into the server and put in a few details. Then it spits back a few more details that you enter into the WordPress setup. Simple.

But that same program will let you do some hands-on stuff to the database. More than enough to get you into trouble if you’re not careful. I’ve tried to back up the databases, but haven’t been confident I could restore them if I ever needed. So I decided to do a safe trial: make a new database from the backup. I managed to do that.

Then I managed to get this website running off the new database. Wow, it looked identical to what it was. It must have worked.

So now, I had two databases, both containing data for both sites. As time went on, though, only the data for the site using each database would be updated and they would become different. So I bravely went in and deleted the table entries for the opposite web page so that the only data left would be the right data. It all worked and everything came out okay. I even cleaned out old tables for a forum I once had on the podcast site, but no longer use.

What brought this on is a new version of WordPress has come out. I started to install it on this site, but it mucked things up badly. Luckily, I had duplicated (backed up) everything and could restore it. I’ve spent a lot of time in SSH typing linux command-line stuff today. But somehow, it managed to lose all the categories. Not a big loss, but it will take a while to reset them in every post.

One of the main things in the new WordPress is tags. Probably not a big thing on a small blog like this, but I use this as a testbed before I make changes to the podcast site. I got the new version to work on another install of WordPress at our robotics team website by following some very exacting step-by-step instructions. Usually, these things just upload and go. So, I’m reluctant to forge ahead too quickly with it here. If you see the site down, I probably tried again and crashed it!

Posted in Humour

Leave a Reply

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

*