• Resolved john.coleman24

    (@johncoleman24)


    Hi There,

    I have a unique problem. I need to install WordPress to use in a classroom that does not have access to the internet. Installing WordPress went as smoothly as it ever does, but it is loading pages incredibly slowly (often, close to a minute-long page loads, even loading them locally, sometimes timing out before the page loads completely and an empty site). We did a test with a fairly large static HTML site and it loads super-snappy, so I do not think it is a web server/networking issue.

    My guess is that there are calls being made to external websites. And, if that is the issue, I am curious if there is any way to disable all external calls from WordPress.

    Anyhow, I know this is, at best, an edge case, but I sure could use some help with it. WordPress would be a great resource in this classroom for these students, but as slow as it is, it is not really usable. Thank you!

Viewing 5 replies - 16 through 20 (of 20 total)
  • does define('WP_HTTP_BLOCK_EXTERNAL', true); in wp-config.php not accomplish this?

    I’m running a company intranet site, if I disable functions that connect out in php.ini, will that also block connections to our internal users?

    This is incredibly frustrating, I switched over from Drupal and I’m shocked it’s such a hassle to install WP in a closed network.

    I have also been frustrated with my wordpress sites’ slowness on local dev, and had also tried john.coleman24’s method of blocking in my hosts file. Trouble is, that keeps us from accessing things in our normal surfing.

    Thank you john.coleman24 for not giving up and keeping this up on the radar, and to screampuff for the mention of define('WP_HTTP_BLOCK_EXTERNAL', true); ! That sent me sniffing on the trail, and i believe that yours is the Solution:

    in wp-config.php
    define('WP_HTTP_BLOCK_EXTERNAL', true);

    This will prevent plugins from working and core functionality, so to allow them, add:

    define('WP_ACCESSIBLE_HOSTS', 'api.www.remarpro.com');

    If you have any other sites/services you want to allow, you can just add them comma-delimited:
    define('WP_ACCESSIBLE_HOSTS', 'api.www.remarpro.com, site1.com, site2.com');

    I posted the TL:DR version of my adventures at https://www.tibetangeeks.com/technologies/web_development/cms/wordpress/10-and_beyond-Performance/External_Connections_and_Phoning_Home/external_connections_from_wordpress.html

    Hope this helps.

    — wpwalker

    @wpwalker nice one, I’have actually read it through;)

    @mishamsk wwwwwwow! ??

    I now use HTTP_BLOCK_REQUEST as well.

    I made changes to the wordpress core in order to make the user interface consistent with the fact that it cannot connect to the internet.

    You can see my changes on github.

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Using WordPress without an Internet Connection’ is closed to new replies.