MySQL

Comment Relish Plugin + High CPU Usage – Fixed The Right Way

How The Problem Started Christmas Eve have just started at about 12:03 AM, when I logged on and saw that dreaded message: Your Account Has Exceeded Its CPU Quota So I did what all normal people do at first: I ignored it. Actually, I had a very good reason to at the time. Since it was 12:03 AM, I assumed that my nightly backup job (backup and compress files and databases) was causing the issue.

A Bit On Open Source And Some Baz Background

This has always been a touchy subject, especially in larger computer firms. But first, let me tell you how I got into Open Source. I started coding in Turbo Pascal 7.0, in about 1996 when I was in Grammar School. I took Turbo Pascal more as an introduction to Programming, instead of a product to do something constructive in.

After Pascal, I was looking into something visual. Hence, I fell into Visual Basic 5.0. Yeah, I know, I’m sorry.

Now this was my first step towards the open source community. I must admit, that I downloaded a pirated copy and ran with it for a while. Now, that was all well and good when I was sitting home playing around with stuff. But when it came to actually, to producing something for a market, you can’t (or should I say, shouldn’t) do that with pirated software.

After that, I got into web development. For this, there was a plethora of free tools available, for use. So I did that for a while. When I got back to college, I got into C++ (using Visual Studio, but still essentially free). That was a step in the right direction. However, as the semesters went on, we got more into using the .NET library. However, for my web development I never got into ASP.

The First Real Plunge into Open Source - Enter PHP

Bit by bit, web development gave way to web programming. This is where PHP came in. I got more familiar with PHP when I started working on different projects for clients. I chose PHP for a few main reasons:

  1. Free Documentation: I could learn almost everything I needed through online documentation.
  2. Cost: My first problem was hosting. ASP hosts used to be almost twice as expensive as their Linux counterparts.

The Open Source Misconception

One of the problems that people have with Open Source is that they think that it’s unsupported. People seem to think that open source software is written by a bunch of kids in basements or something. This is not the case, by any means.  For example, a lot of the Linux distributions are totally free and totally supported.  Wake up people; free doesn’t mean unsupported. The whole “You get what you pay for” isn’t always true.

InsaneGB Review – Free Web Server 5GB Disk Space, 20GB Bandwidth

I can’t remember where exactly I heard about this web host, but InsaneGB.com sounded like a great deal. You can read their website for more details, but in a nutshell they got PHP 5, MySQL 4, and everything (Databases, Add-on domains, etc) is unlimited except disk space and bandwidth. They give you 5GB for disk space and 20GB on bandwidth per month. Which is great for a free host, if you ask me; heck, they even offer cron jobs.

Automate MySQL Database Backup With WebCron – No Cron Jobs? No Problem – Part 2

Got The Cron Web Cron is a great method of automating tasks on your server if you’re not blessed with cron jobs. However, after writing this I stumbled onto something that may fit your needs a bit better; Remote Cron is that service. It’s everything Web Cron is and more: It’s Totally Free It’s in English What more can you ask for? Yeah, I know, my standards are really low.

Automate MySQL Database Backup With WebCron – No Cron Jobs? No Problem – Part 1

Clock

What To Do When You Can’t Cron

One pet peeve that I have with 1and1 hosting was their lack of Cron Jobs. Cron Jobs are basically the Unix method of scheduling stuff, much like the Windows Task Scheduler. If you’re on a Unix/Linux host, then they use cron jobs to schedule their internal activity. But not every host is kind enough to give you the same power to do so. Now that I’m on DreamHost, I don’t have this problem anymore, but a lot of shared hosts still lock up the cron jobs. And since hosts like 1and1 aren’t too reliable with their backups, doing your own backups becomes, more of less, essential. There are, of course, alternatives if your host doesn’t provide you with cron jobs, such as phpJobScheduler (used this a lot back in the day) and pseudo-cron.

How The Other Guys Work

The way these work is that, they keep track of tasks and times every time the cron job is called, but you need to include them in one of your highly accessed pages (e.g. Home page). With phpJobScheduler, you can include the file in your PHP code, or you can include it using the img tag. Using the second (2nd) method spits back a transparent GIF of 1 pixel, so nothing will be displayed on your page and you could even use it within plain HTML pages if you needed to. When this is triggered, it checks the database for time of each task, compares that to the current time, them if x > y it runs the task. Simple really. Since they need to be triggered via a user visit, it’s never going to be pin point accurate; this is why you need to include it on a page getting high traffic. Some of the scripts even have an option to build in to help with this. It’s a sort of buffer time. This says that even if the specific start time of the task hasn’t arrived yet, run it anyway if it’s within the buffer amount. You would increase or decrease the buffer based on your anticipated traffic.

Moving WordPress To A Different Domain

No, I’m not moving, not yet anyway. But Lava is. She scored a domain name which describes her blog so perfectly, that she couldn’t help but nab it up: HowISaveMoney.net. Now what are the odds that this domain would still be lying around?

Lava finally made the big step and “moved into her own place”. Moving domains is always such a hassle, but there are a few things that make the process a little bit easier. I was the Administrator during this move and I must say it was a little bit involved, but I think I got it done.

The Domain

The domain was purchase at 1and1.com. Why not NetSolutions, Yahoo, GoDaddy? Because they all have great promotional deals but then it’s upward of $8 to renew every year. 1and1 has a nice flat rate of $5.99 every year.

The host remained the same, since this particular hosts allows up to 10 domains pointing to it. All the files are simply dumped in a different sub folder. I both love and hate the idea of one consolidated host. It’s easier to manage: one login one set of administration and maintenance, cheaper than several different hosts. But if one sight goes down, they all go down. If a hacker gets into one, he damn well gets into all of them. The load on all of the sites is still very small and way under the allotted bandwidth limit. Most of them are blogs using WordPress and we all know what a small physical footprint WordPress leaves behind. If any one site seems to out grow things little family what it turns 18 or something, it will definitely be kicked out of the nest onto it’s on hosting package.

Copy Files

Now this should be the simple part. You copy everything into the folder that is going to house your new blog. There are a few minor changes that you might need to make. Depending on your previous setup you may need to edit the .htaccess file and change the RewriteBase option. But I do think that WordPress will configure it for you when you set up your permalink stuff.

One change that is necessary is editing your wp_config.php file. If you’re changing databases, you need to make the changes here. If you’re not changing databases you still need to make the changes to the table prefix. I forgot to mention that we still need to keep the old database active (details to come later).