I have been doing a lot of work lately with the Laravel 4 PHP framework and recently had a requirement to integrate the MailChimp API into an application. Laravel makes integrating APIs such as this rather simple through the use of facades, and MailChimp is no different. Luckily, there is a Composer package already pre-made for working with MailChimp in Laravel and easily installed. Step 1 To install the required classes for the API start by editing the composer.json file in the root directory of your application by adding the package under the require block as such: [crayon-5df762ec4d645783204900/] Step 2 Update Composer at the command prompt. This will install the required classes for the API and the necessary wrappers for Laravel. [crayon-5df762ec4d64d903376330/] Step 3 Next edit the app/config/app.php file as such: Under the providers array add the following at the bottom: [crayon-5df762ec4d650584730819/] Under the aliases array add the following at the … [Read more...] about How to setup the MailChimp API with Laravel 4
First, let me apologize to any visitors that may have had problems getting to my blog when using a Mac running OS X. I use a Macbook Pro for some work and just found that a recent change I made to the way I had caching setup on my server was causing problems for some of those who tried to access my blog via their Mac. If a user tried to go to one of my pages they would receive an error saying either "Cannot Decode Raw Data" in Safari or "ERR_CONTENT_DECODING_FAILED" in Chrome. I use W3 Total Cache for caching on this blog and also use Memcache for caching. I had recently switched the Page Cache option to also utilize Memcache. Apparently some Mac's don't like that when a page is served via cache using Memcached and generate the above errors. After determining what was causing the issue I quickly switched the Page Cache option back to using Disk Enhanced. Problem solved and everything seems to be working normally now. This is a quick post first to apologize to any users that may … [Read more...] about “Cannot Decode Raw Data” or “ERR_CONTENT_DECODING_FAILED” errors
Once you have Nginx setup and configured for your server, a good idea is to next setup your server to automatically rotate and compress the Nginx log files on a daily basis. This will prevent the log files from growing to astronomical sizes over time and make them much easier to manage. There are a couple options for doing this, but the one I prefer the most is by using a cron job to regularly schedule these rotations. The following article assumes you have root access and can SSH into your server. Note:Improve your site performance and receive phenomenal support at the same time. For discounted hosting services visit Bluehost.com. The first thing you will need to do is create a the script for the job you are about to run via cron. This script is fairly straightforward in that it is going to tell the system to move the current access and error logs to a new file, create new ones, and the compress the old ones. Let's open our favorite editor (mine is nano) to create the … [Read more...] about Ubuntu Server Guide: Rotate Nginx log files
Not to be intimidated by new technologies or platforms, I decided to move from Apache to Nginx when I upgraded my server and I could not be happier with the performance and speed. While initially intimidating, moving WordPress to run on Nginx was easy and I encountered no real problems (except for the minor typo here and there in my config file). How to Install Nginx on Ubuntu 12.04 LTS Note:Improve your site performance and receive phenomenal support at the same time. For discounted hosting services visit Bluehost.com. The steps I followed for installing Nginx on Ubuntu are laid out in my article Upgrading Nginx on Ubuntu 12.04. While the article covers upgrading from a previous version of Nginx, about half-way down the page you will see the steps for installing the latest version. Configuring Nginx for WordPress I run the W3 Total Cache plugin for caching on this site and I would highly recommend you doing the same. The performance increase is significant and by combining it … [Read more...] about WordPress Tutorial: Installing WordPress with Nginx on Ubuntu 12.04
I spent the better part of a day playing with the configuration of the server this site runs on hoping to increase the speed and overall performance of this site. The end result was nothing less than astonishing so far and I still have a few tweaks I want to complete before I am happy. In short, I was able to increase the performance of this blog by an incredible 405%. To give you an idea of the before an after: Before: [crayon-5df762ec510dd860531325/] After: [crayon-5df762ec510e3338414757/] While I plan to write a series of posts detailing the exact steps I took, I will give a rundown of the steps I took below for those of you that want to get a head start on optimizing your own servers. The first step I took was upgrading the version of Nginx I was running on the server from the default version installed by Ubuntu to the latest stable version from Nginx (version 1.4.3). Ironically enough though my performance actually dropped a little after this upgrade. I had to make some … [Read more...] about Nginx + Memcached + WordPress Performance Increase
Many times the packages installed from the Ubuntu repositories are older versions (in some case much older versions) of software. This was the case with PHP where I had to upgrade from version 5.3 to the latest version and now has been the case with the version of Nginx I was running. While short, this article will walk you through the steps I took to upgrade from Nginx version 1.1.19 to the latest stable version 1.4.3 on a server running Ubuntu 12.04 LTS. Note:Improve your site performance and receive phenomenal support at the same time. For discounted hosting services visit Bluehost.com. Ubuntu Server Guide First, you can verify the version of Nginx your server is running by issuing the following command: [crayon-5df762ec51ff8119964768/] You should see something like this: [crayon-5df762ec51ffe458254901/] First things first, I recommend backing up your nginx.conf file and your server configuration files if you are upgrading on a live server just in case there is a problem or … [Read more...] about Ubuntu Server Guide: Upgrading Nginx on Ubuntu 12.04
In the process of rebuilding this blog, I noticed that one of my more popular posts previously was in regards to whether a copyright notice was needed/required for your personal website. I also realized that I had removed that post when building out the new blog. I did not do that on purpose or because of new information, so in light of this discovery I am bringing that post back to life. Before I begin, let me clarify one thing. I am not a lawyer and did not stay at a Holiday Inn Express last night so I don't even think I am a lawyer. What prompted my original post was this article “Copyright notices on websites. Needed?“. While the article is for the most part accurate, I believe there are a couple clarifications that must be made. Again, I am by no means an attorney, but I have researched this issue significantly and here is what I have found. Before I continue, let’s clarify what constitutes a “copyright notice“. By definition the copyright notice must include 3 parts. The … [Read more...] about Do I need a copyright notice or copyright symbol on my website?