What is the correct way to use WordPress functions outside WordPress files?
I read about 2 methods for initializing WordPress function outside of WordPress files so We can use these functions on any page or website outside the WordPress blog.
Which one of these 2 methods is the correct one? What are the use cases for each method if both are correct? What is the deference between using one method or the other?
Method 1:
?php
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');
?
Method 2:
?php
define('WP_USE_THEMES', false);
require('./wp-load.php');
?
Topic wp-blog-header.php wp-load.php php Wordpress
Category Web