Skip to content

Feature: Generation vs crawling  #799

Description

@leonstafford

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 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions