-
Notifications
You must be signed in to change notification settings - Fork 292
Closed
Labels
Description
tracking in branch https://github.com/leonstafford/wp2static/tree/feature/generation-vs-crawling
originally discussed/tested in #760 (comment)
can simulate running this within PHP, aka plugin, by entering wp shell and running:
$_SERVER['REQUEST_URI'] = '/author/admin/';
include 'index.php'will output the admin author page's HTML.
Pros:
bypass webserver (don't need one at all)
reduce network latencies
esier to write caching logic
Cons:
lose webserver's request based process pooling?
need to simulate some WP bits, ie these var errors below:
Constant AUTH_KEY already defined in /usr/html/wp-config.php on line 49
Constant AUTH_SALT already defined in /usr/html/wp-config.php on line 53
Constant DB_CHARSET already defined in /usr/html/wp-config.php on line 35
Constant DB_COLLATE already defined in /usr/html/wp-config.php on line 38
Constant DB_HOST already defined in /usr/html/wp-config.php on line 32
Constant DB_NAME already defined in /usr/html/wp-config.php on line 23
Constant DB_PASSWORD already defined in /usr/html/wp-config.php on line 29
Constant DB_USER already defined in /usr/html/wp-config.php on line 26 PHP Warning: Constant LOGGED_IN_KEY already defined in /usr/html/wp-config.php on line 51
Constant LOGGED_IN_SALT already defined in /usr/html/wp-config.php on line 55
Constant NONCE_KEY already defined in /usr/html/wp-config.php on line 52
Constant NONCE_SALT already defined in /usr/html/wp-config.php on line 56
Constant SECURE_AUTH_KEY already defined in /usr/html/wp-config.php on line 50
Constant SECURE_AUTH_SALT already defined in /usr/html/wp-config.php on line 54
Constant WP_CACHE_KEY_SALT already defined in /usr/html/wp-config.php on line 57
Undefined array key "SERVER_NAME" in /usr/html/wp-includes/general-template.php on line 3413
Undefined array key "host" in /usr/html/wp-includes/canonical.php on line 687
Undefined array key "host" in /usr/html/wp-includes/canonical.php on line 687
Undefined array key "host" in /usr/html/wp-includes/canonical.php on line 696
Undefined array key "host" in /usr/html/wp-includes/canonical.php on line 696
Undefined array key "host" in /usr/html/wp-includes/canonical.php on line 699
Undefined array key "host" in /usr/html/wp-includes/canonical.php on line 699
Undefined array key "scheme" in /usr/html/wp-includes/canonical.php on line 720
Undefined array key "scheme" in /usr/html/wp-includes/canonical.php on line 720
Reactions are currently unavailable