Category / How To

I’ve been wanting to get onto PHPCS for quite some time now. While reading a blog post discussing it, I decided it was now or never. I should have started using PHPCS a while ago anyway…

So, in order to get things up and running, I did a quick Google search and ended up finding a pretty good tutorial, except that it is slightly outdated. Some of the instructions did not match the latest version of PhpStorm.

The article is How to Setup PHP Code Sniffer in Phpstorm on a Windows Machine from W3Guy.com.

NOTE: At the time of writing this article, I was running PhpStorm version 2016.2.1.

Most of the instructions are correct, except for a couple of them. Here is an updated version of the outdated steps. Also, you’ll need to have PEAR installed on your local machine beforehand.

Step 2

You will actually need to copy all the WordPress-xxx directories in CodeSniffer’s Standards directory as they rely on one another (otherwise you’ll get errors in PhpStorm).

Also, because I’m only using standard PHP on my local machine (no XAMPP or any pre-packaged web server), […]

Continue reading →

I have been using phpDocumentor on my Windows laptop lately, and one of the requirements is to have PEAR installed.

While this is a pretty simple process on Linux, it gets a little more complex on Windows.

Actually, it is not that complex. It is just difficult to find the proper resources (or at least it was for me).

I did find a number of posts / tutorials explaining the manual process of installing PEAR, but:

  1. It introduces possibilities of mishaps,
  2. I prefer when things are automated 😉

Automatically Install PEAR on Windows

First of all, I should specify that this was done on a Windows 10 Home x64 install with PHP 7.0.6. No WAMP, no MAMP, just PHP.

There are basically 2 steps required to install PEAR:

  1. Download the “installer”
  2. Run it
  3. Add the environment variables (yeah that’s more than 2 steps, but this one is optional. Bonus!)

Download go-pear.phar

PHP.net provides a super handy phar file that will allow you to install PEAR on your system in just one command line. […]

Continue reading →

My blog has been hosted on various machines from various providers. It is only recently that I started to aim for performance, though.

For the last couple of years, it has been hosted with EvxOnline. I then switched to a DigitalOcean (affiliate link, direct link available in article footer) droplet with ServerPilot.

While performance was definitely better with DigitalOcean + ServerPilot compared to EvxOnline, I wanted something even faster.

I have had my eyes on EasyEngine for a little while but didn’t have the chance to really try it yet. So the day I realized I made a typo in my ServerPilot’s app name, the maniac in me didn’t need another excuse to get started with a new stack.

EasyEngine vs ServerPilot

First of all, I need to say that I really like ServerPilot. I’ve used it for many client and personal projects. It is extremely easy to setup, the stack performs really well, and it keeps your server up to date. If you’re looking for good performance without getting your hands too dirty, go for ServerPilot.

If you want to push things a little further however, […]

Continue reading →

One more NameCheap-related article. Yeah, I’m a big fan of their services!

TL;DR: FreeDNS can’t manage .is domains.

For some client work, I needed to use NameCheap’s FreeDNS service to manage a domain name with the .is extension.

After some back and fourth with the domain registrar to try and switch the DNS to FreeDNS, I finally got in touch with NameCheap’s support team and started what ended up being a 1-hour conversation on their live chat.

By investigating the issue bits by bits, we came to the conclusion that FreeDNS can’t manage .is domain names because it doesn’t fit the .is registry requirements.

The part that blocks everything is that FreeDNS’s nameservers’ TTL is set to 1800 seconds while the .is registry requires at least 86400 seconds. The NS‘s TTL can’t be changed, even internally by the NameCheap’s team.

So, sadly, a .is domain name can’t be managed by NameCheap 🙁

When working on client projects, e-mail delivery is a primary concern. Most of my clients (most people in general I assume) use e-mail quite extensively for lead generation on their site.

Making sure e-mails are correctly delivered is crucial. Unfortunately, the basic way e-mails are sent out with website is quite unreliable. The common function used in PHP for instance is mail(). As a WordPress specialist, I very often work with its WordPress wrapper wp_mail().

What this function does is send the e-mails using the hosting server itself. This is very dangerous, especially when using shared hosting. Poor delivery and blacklisting are the two major risks.

Email Delivery Services

I’m not going to list all the reasons why you shouldn’t use a hosting server to send out e-mails. I’m just going to say that it is more than recommended to use a dedicated e-mail delivery service. There are plenty available. Mandrill, MailGun, SendGrid, MailJet…

For all the small clients I’ve been working with, I’ve always used Mandrill (made by MailChimp). They offered a pretty nice free plan that was more than enough for small businesses. However, […]

Continue reading →

A couple of days ago I published a new “about” page for introducing myself.

I’ve always struggled to find the best way to brand myself in a way that completely satisfied me. In the past, I only had a landing page linking to the various profiles and networks I wanted to highlight like WordPress.org, GitHub, Twitter, etc.

However, I also wanted a space where I could write. I sometimes feel the need to write about things, or express a point of view about a trending topic. For that, I need a blog where I can write whatever I want, whenever I want. The downsides are:

  1. I am not a regular writer,
  2. I am not a native English speaker, which means my writing is not too pleasant to read

For those reasons I’ve been tempted to just close the blog and go back to a simpler landing page on this domain. However, I know that there’s going to be a day where I want to write something and I’ll be wondering where to do that. Again, not being a native English speaker kind of stops me from writing on Medium or the likes. […]

Continue reading →

This tutorial shows how to install Nginx with server blocks in order to be able to host multiple sites on the same droplet.

This first post of the series “Cloud Hosting with DigitalOcean” will show you how to setup a droplet with Ubuntu 12.04 and SFTP.