Tag: wordpress

WordPress: “HTTP Loopback Connections Disabled”

You get a WordPress error that says, "HTTP Loopback Connections Disabled."

It took me awhile to figure this one out. I was getting it on a BuddyPress install (and other have reported seeing it with BackupBuddy, among others).

Most of the web sites had pointless or ineffective solutions. Some said to add define('ALTERNATE_WP_CRON', true); to wp-config.php, which was completely irrelevant, uneffective and annoying.

This is what worked for me.

Tag: wordpress

Snippet: Disable WordPress Enqueued Script Caching

This code snippet will show you how you can disable caching of enqueued scripts in WordPress in your development/staging environment(s) but not in your production environment.

Add Environment Variable

  1. Edit the wp-config.php for each of your instances.
  2. Add the following (if it doesn’t already exist):

(replace ‘development’ with whatever label you want for each environment, such as ‘staging’, ‘production’, etc.)

Add/Modify Code to Enqueue Your Custom Scripts

We’re now going to tell our enqueued scripts to either:

  • If WP_ENV is ‘production’, when append the theme version to the script.
  • If WP_ENV is anything else (like ‘development’ or ‘staging’), append a timestamp to the script link.

Tag: wordpress

Carbon Fields

 
It is rare that I find a plugin/framework that gets me so excited. One of these days I will have to publish a list of my favorites. Today I am here to talk about Carbon Fields for WordPress.

Let me begin by saying that Advanced Custom Fields Pro is one of my favorite plugins, and I probably use it more than any other (maybe on par with Redis Object Cache). I have a developer’s license for it. It is amazing and also a bargain! I wish that I could use it for everything!

That said, some of the things that make ACF Pro amazing, like Repeater field and Options pages, are not redistributable for free (as in beer) plugins. I totally understand and respect why – I would do the same thing. However, there are times when I make a plugin that I just want to give …

Tag: wordpress

WordPress Security Tips (Comprehensive List)

There are some simple, some free, some more difficult and some commercial solutions out there for making WordPress more secure. The question is not IF you will get hacked, but WHEN. The more you can do to secure your web site, the better.

The Basics

Below are minimal steps that you should take to help secure WordPress, in order of importance:

  1. Keep WordPress, plugins and themes updated – There are a number of ways that you can do this:
    • If you are working with a web site that isn’t too complex and/or doesn’t need to be babysat, WP Update Settings is a great plugin. It allows you to configure what to update: WordPress minor updates, major update, plugins and/or themes. It also has the option to notify you of updates. Configure as needed.
    • You can update your plugins manually if you prefer. It may help to use a monitoring services