Title: Does wp-load.php grant access to the wordpress database?
Last modified: August 21, 2016

---

# Does wp-load.php grant access to the wordpress database?

 *  [jamesbarnett39](https://wordpress.org/support/users/jamesbarnett39/)
 * (@jamesbarnett39)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/does-wp-loadphp-grant-access-to-the-wordpress-database/)
 * Hello,
 * I have a wordpress website and I have a few custom pages stored in my public_html
   directory that require wp-load.php and this allows me to get the header and footer.
 * I am just wondering if wp-load.php also allows you to access the wordpress database
   tables or do I connect to this database as usual with the required mysql code?
 * Below is basic snippet of page. This shows the header at the top, the footer 
   at the bottom and leaves the rest of the site available to be custom designed.
 *     ```
       <?php
       require('wp-load.php');
       get_header();
       ?>
       Your page content here.
       <?php get_footer(); ?>
       ```
   
 * I want to be able to access the wordpress database and retrieve image paths from
   the two tables I have created within that database to use those paths as image
   sources. I’ve done this rather than use blob as I wish to keep my database backups
   fast.
 * Any help would be massively appreciated,
 * James.

The topic ‘Does wp-load.php grant access to the wordpress database?’ is closed to
new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [images](https://wordpress.org/support/topic-tag/images/)
 * [loading](https://wordpress.org/support/topic-tag/loading/)
 * [sql](https://wordpress.org/support/topic-tag/sql/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [jamesbarnett39](https://wordpress.org/support/users/jamesbarnett39/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/does-wp-loadphp-grant-access-to-the-wordpress-database/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
