I have a page that must reside outside of my WordPress installation (long story). Using a few examples I got the connection to the files set:
define('WP_USE_THEMES', false); define( 'CABSPATH', dirname(__FILE__)); //CABSPATH used to go down one folder require(dirname(CABSPATH).'/wp-load.php');
When I go to the page I get the “Error establishing a database connection” error. The main install of wordpress is fine.
The other page/folder in on the same server just outside of the wordpress installation folders. I’ve found examples of people who have done this but not anyone who had this problem.
- The topic ‘Page outside of WordPress won't connect to the database’ is closed to new replies.