Blocking external requests from your WordPress site

I use several local installations of WordPress for development and testing purposes. One thing which annoys me is that it when I’m connected to the internet, it takes a second or two for the page to refresh.

This happens even when the WordPress installation is locally hosted! So what’s going on there? WordPress must be sending out some external request to the web here. Because things load super fast if I disconnect from the internet.

As a fix, I now use the following piece of code in my wp-config.php file:


define('WP_HTTP_BLOCK_EXTERNAL', true);

That has helped to speed things up for me! 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s