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 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: Logo

You are commenting using your 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.