最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

customization - Are there any security issues with setting the WP_INSTALLING constant to true?

matteradmin5PV0评论

Running Wordpress 4.1 on a CentOS 6.5 instance through VirtualBox as a dev server. When logged in as admin on both ssl and non-ssl sites Wordpress curl requests are taking a long time to run (45+ seconds overall before page loads). This renders my dev site unusable, as you can imagine.

While browsing around I found many people complaining of this extremely slow curl issue and I've discovered that setting the WP_INSTALLING constant to true speeds the site up 100%. I imagine it blocks all outgoing requests?

What are the consequences of setting this? I see that it breaks my front-end (admin side works well).

define('WP_INSTALLING', true);

Or, How can I just disable all outgoing requests? I profiled the page load and it appears that 65% of the hanging is due to curl requests. I just want to disable these external checks.

Running Wordpress 4.1 on a CentOS 6.5 instance through VirtualBox as a dev server. When logged in as admin on both ssl and non-ssl sites Wordpress curl requests are taking a long time to run (45+ seconds overall before page loads). This renders my dev site unusable, as you can imagine.

While browsing around I found many people complaining of this extremely slow curl issue and I've discovered that setting the WP_INSTALLING constant to true speeds the site up 100%. I imagine it blocks all outgoing requests?

What are the consequences of setting this? I see that it breaks my front-end (admin side works well).

define('WP_INSTALLING', true);

Or, How can I just disable all outgoing requests? I profiled the page load and it appears that 65% of the hanging is due to curl requests. I just want to disable these external checks.

Share Improve this question asked Jan 13, 2015 at 17:37 adamgedneyadamgedney 212 bronze badges 3
  • 3 Did you try define('WP_HTTP_BLOCK_EXTERNAL', true); – Wyck Commented Jan 13, 2015 at 17:58
  • 1 Please add your comment as an answer and I'll accept it. That was exactly what I needed. I didn't know that constant exists. Thanks! – adamgedney Commented Jan 13, 2015 at 18:50
  • Telling WordPress that it is installing an update seems an odd way to improve performance, for sure! – Matty J Commented Mar 3, 2016 at 22:09
Add a comment  | 

1 Answer 1

Reset to default 0

I want to credit @wyck for his answer of setting:

define( 'WP_HTTP_BLOCK_EXTERNAL', true );

I also just wanted to add that this and a lot of nice other config options are nicely documented in the Codex.

Post a comment

comment list (0)

  1. No comments so far