What are the differences between WPINC and ABSPATH?

They are defined as follows:

define( 'ABSPATH', dirname(dirname(__FILE__)) . "https://wordpress.stackexchange.com/" );
define( 'WPINC', 'wp-includes' );

dirname is a PHP function that returns the path of the parent directory, and wp-includes is pretty self explanatory.

I would say ABSPATH is better because it’s one of the first things WP loads and it also looks better:) But there is no real “right way” because they both work.

Leave a Comment