Title: Including WordPress with php.
Last modified: August 18, 2016

---

# Including WordPress with php.

 *  [akestepa](https://wordpress.org/support/users/akestepa/)
 * (@akestepa)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/including-wordpress-with-php/)
 * If I have my WordPress index in a different directory (/wordpress/index.php),
   how do I use php includes to place it in my site’s index file? I tried
 * >  <div style=”position:absolute;left:24px;top:286px;width:270px;z-index:1;” 
   > align=”justify”>
   >  <?php include(“home/username/public_html/wordpress/index.
   > php”); ?> </div>
 *  but I get the following errors:
 * >  Warning: main(home/vibrant/public_html/wordpress/index.php): failed to open
   > stream: No such file or directory in /home2/vibrant/public_html/blog.php on
   > line 3
   > Warning: main(): Failed opening ‘home/vibrant/public_html/wordpress/index.php’
   > for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home2/
   > vibrant/public_html/blog.php on line 3
 *  Is there any way to include it or will I have to install WordPress in my root
   directory?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/including-wordpress-with-php/#post-183689)
 * Do you have anything else on that root index file? If not, i.e. you want your
   WP index file to be there… just search!
    (hint: look at the top here: DOCS >>
   Installation)
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/including-wordpress-with-php/#post-183691)
 * If you mean to integrate your blog into your site’s design, all you have to do
   is add the Loop to your design.
 * [http://codex.wordpress.org/The_Loop](http://codex.wordpress.org/The_Loop)
 * For more info, please do a search here for “integrate” or “the loop”.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Including WordPress with php.’ is closed to new replies.

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 2 replies
 * 3 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [21 years, 4 months ago](https://wordpress.org/support/topic/including-wordpress-with-php/#post-183691)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
