Ever since studying and working with databases 6 months ago, I’ve become fascinated with SQL and its relatively simple syntax. As a guide to the reader, I’ve gathered the essential criteria that employers expect you to know when applying for a database-related job.
In this blog, I will cover what SQL is, its different flavors and syntactical differences centered around an example query, the importance of EXPLAIN and SQL query runtime, and finally some example problems specifically in MySQL.
Read MoreIf you’re like me, you run a WordPress blog and are terrified of the thought of something going wrong. With core updates, theme updates, plugin updates, and server component updates, there is a lot of room for error. This is where a WordPress backup could help ease your mind.
WordPress recommends taking a backup of your blog before any of these are done and there are even some popular plugins that will do this for you. For example, you could use the popular UpdraftPlus or similar, but I believe there is room for error in those as well. While I could be wrong, I think WordPress must be in good shape for backup plugins to be successful.
The alternative would be to create your own backup scripts that run on a cron schedule. We’re going to see how to do this for WordPress instances running on a Linux machine.
Read MoreSo you’re at a time in your life where you want to manage your own web server. Maybe you are currently on a shared hosting plan and it isn’t giving you the performance you need because your web application is getting crazy amounts of traffic or maybe you just want to play the role of DevOps. My blog (the one you’re on now) is on a virtual private server (VPS). The LAMP (Linux, Apache, MySQL, PHP) stack sits on top of this server which allows me to serve web applications or support software like WordPress.
My VPS is hosted on a Digital Ocean Droplet with the Debian Linux distribution. Reading further will show you how to set up the LAMP stack on your own Debian Linux instance.
Read MoreSince starting this blog in July of 2014, I have had an unexpected amount of growth. So much, that a lot of strain has been placed on my virtual private server (VPS).
A common issue that has plagued me and many other WordPress users is the awful MySQL crash due to exhausted resources. This is because the server has run out of resources due to traffic spikes or other anomalies. The worst part for me is that MySQL tends to crash while I’m sleeping, putting my blog out of commission for up to six hours at a time. This is not good when you’re trying to be a reliable source of information on the internet.
Luckily, I’ve developed a script that will elegantly resolve these related problems.
Read MoreIf you’ve been keeping up with some of my previous posts, you’ll know that I’ve been making an effort to move away from PHP ZendFramework (or PHP in general) to Node.js. Up until mid December 2014, my personal profile website www.nraboy.com has been using PHP ZendFramework 2, and for whatever reason it would crash my Apache instance constantly.
Since mid December 2014, I’ve made the switch to Express.js framework on top of Node.js. I did a previous post on the topic of Express.js and why I like it, but it is beyond the point for this particular article.
I have a few sites still running PHP and I didn’t want to pay for a new server strictly for Node.js applications. Instead I chose to run LAMP (Linux, Apache, MySQL, PHP) side-by-side with Node.js on the same server. The following explains how I did this.
Read More