installation - Disable redirect to install.php

admin2025-01-07  3

For example, i include 'wp-load.php' from external file. but if WP is not installed, then while i access that file, it redirects to '/wp-admin/install.php'. How to disable redirection, even if WP not installed, it doesnt matter to me.

For example, i include 'wp-load.php' from external file. but if WP is not installed, then while i access that file, it redirects to '/wp-admin/install.php'. How to disable redirection, even if WP not installed, it doesnt matter to me.

Share Improve this question asked May 8, 2015 at 12:20 T.ToduaT.Todua 5,8509 gold badges51 silver badges79 bronze badges 1
  • 1 What is the use case for this? Why is this even an issue? – s_ha_dum Commented May 8, 2015 at 13:46
Add a comment  | 

2 Answers 2

Reset to default 0

Well, One trick seems to be defining a constant:

define( 'WP_INSTALLING', 'smth' );  
wp_installing(false);

Seems to be the way to go though using the constant is still supported.

Calling the function without params returns actual status, passing false disables installing mode.

See docs: https://developer.wordpress.org/reference/functions/wp_installing/

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736258019a482.html

最新回复(0)