Geo IP at WP Engine

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

If you host your WordPress at WP Engine, you’re interested in utilizing Geo IP, and your plan allows it, ask the Support team to move you to a compatible server and to enable Geo IP. Once you install and activate the WP Engine Geo IP plugin, then everything should start working without issue.

The following is an example of WP Engine’s Geo IP offerings and should display your geographic information. The shortcodes to use can be found underneath:

Country: US
Region (State): VA
City: Ashburn
Postal Code: 20149
Latitude: 39.04810
Longitude: -77.47280
Location: Ashburn, VA US


Country: [geoip-country]
Region (State): [geoip-region]
City: [geoip-city]
Postal Code: [geoip-postalcode]
Latitude: [geoip-latitude]
Longitude: [geoip-longitude]
Location: [geoip-location]

Note: Shortcodes only display this information back to the visitor. You may not be able to use it in conjunction with other plugins. You will usually need to resort to PHP coding to do more advanced processes. Here is the class and functions you can use to obtain this information. Note the GeoIP class you’ll need to initialize:

With that, you could do more advanced functions with conditional statements. The following will perform a redirect using wp_redirect() if the visitor’s country is “US”:

While you can certainly use the GeoIP class, the geo information can also be found in the environment variables. This is the information/array used to set the Geo info:

With that information, just note that outside of the plugin not working, you won’t be able to ask WP Engine for assistance with coding. There’s also no guarantee that the code above is functional and is to only be used for demonstration purposes.

New with WP Engine GeoIP v.1.1

The latest update to the WP Engine GeoIP plugin introduces new shortcodes. For instance, you can display text for a certain country, region, or exclude text from a city:

In addition, you can easily test these changes by adding query arguments to the end of the URL:

So instead of using a proxy or VPN, you can visit your website as a visitor from Canada:

SpamAssassin Continued

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

We previously looked at basic SpamAssassin configuration in this previous article. We are now going to be looking into further advanced testing and configuration of SpamAssassin.

Testing SpamAssassin with GTUBE

Aside from adding keywords used to mark an email as spam which you can find out how to do here, you can also use a string called GTUBE (Generic Test for Unsolicited Bulk Email). If working correctly, SpamAssassin automatically gives it an antispam score of 1000.

Add the following string to the body of the email without line breaks or spaces:

Continue reading


Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

WordPress 3.6.0 introduced the Heartbeat API. It’s the backbone to some of the new features such as session management, better revision management, post locking, auto-saving and more. Unfortunately, it also introduced increased CPU usage when logged into the WordPress Dashboard.

The issue lies in the way the Heartbeat API works. When logged in, your browser sends a POST request to wp-admin/admin-ajax.php every 15 seconds when your tab is active and every 120 seconds when your tab is in the background. Since it’s sending a POST request, it’s spawning a new PHP process. This isn’t so much an issue if you have a single tab open but the problem lays for users who like to keep multiple tabs open at a time while logged in to the Dashboard. Take a look at the following POST request data:

Continue reading

Hackintosh with Z87-DH3P

Although unrelated to systems administration, I wanted to share some instructions for getting Mac OS X 10.9.2+ installed on a specific set of PC parts (mostly the motherboard). Your milage may vary.  I am not responsible for any issues you come across!

This article assumes you have the following components in your PC:

  • GA-Z87-D3HP
  • i5 4670
  • Geforce GTX 660

The type of processor should not be much of an issue (i3, i5 or i7), however, your installation may vary depending on the graphics card.

This article uses TonyMacX86’s guides and software to get everything working properly. You will need a USB drive of at least 8 GB in capacity and a Mac to install the OS installer onto the USB Drive.

Continue reading

Understanding cPanel’s SpamAssassin


How it scores

The SpamAssassin score can be an integer or real number
required_Score = 5
required_Score = 8.2

Emails are marked with a number starting at 0. This is, in-a-sense, how spammy your email is based on a huge number of factors such as content and origination. A higher number means your email is very spam-like while a lower number such as 0 or 1 is a relatively clean email. Take a look at how SpamAssassin marks emails here:

There are some factors that subtract from the score such as verifying that your email is originating actual server. Your emails should ideally be under 5. You can find out how to increase your emails reputation here.

The number you should be setting for marking email as spam is set under “Configure SpamAssassin.” The lower the number, the more likely your email will be marked as spam. The higher, the more relaxed the filter is. Here’s an example:

Continue reading

HTML Signatures in cPanel Webmail

Some knowledge of HTML is required for adding images in HTML signatures. You will need to upload the image to a server somewhere (preferably yours) and prepare a link. Also, these email signatures do not carry between each Webmail option in cPanel or email clients.

Example: <img src=”” />


To turn on HTML signatures, click on “Settings” in the upper right hand corner, then click the “Identities” tab. Select the email address on the left side. Select the Signature tab and click “HTML Signature”. From here, you can add the HTML necessary to display your images. Note, however, that HTML for the entire email is disabled by default and would have to be enabled for each message you compose. To force full HTML email for every message you compose, click on the “Preferences” tab, then “Composing Messages”. Next to “Compose HTML Messages”, in the drop down select “always”, then save.

– Signatures don’t automatically add at the end of a new email?
Settings > Preferences > Composing Messages > under “Signature Options”
Check to see if “Automatically add signature” is set to “always”.

SquirrelMail & Horde

Unfortunately, the other two Webmail applications at the time of this writing do not support HTML signatures, let alone HTML emails. Both support regular signatures but not HTML.

So if you insist on using HTML for your email signature, Roundcube is the (only) way to go. An even better solution would be to use your own email client.

AFP in Ubuntu

This guide will walk you through installing and configuring AFP in Ubuntu. If everything goes well, your Apple computers will be able to connect (and backup with Time Machine) to the server without issue.

This article combines steps from other articles and updated to reflect the latest version of Netatalk (AFP), Mac OS X (Mountain Lion) and Ubuntu 12.04. These general steps can work for other distributions of Linux but have not yet been tested. In Ubuntu, there is no need to manually open ports in the firewall.

Continue reading