Title: Getting posts from wordpress hosted on different website
Last modified: August 21, 2016

---

# Getting posts from wordpress hosted on different website

 *  [djbessant](https://wordpress.org/support/users/djbessant/)
 * (@djbessant)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/getting-posts-from-wordpress-hosted-on-different-website/)
 * Hello,
 * I have a problem which is starting to wind me up!
 * I’ve got 2 websites, website 1 has wordpress installed and it is only used to
   list testimonials from my clients, the rest of the website is NOT wordpress.
   
   Now I use a code to take the testimonials I post on my wordpress and display 
   them on website 1 as they are posted which is great – works perfectly.
 * Now I have just got another website and I want those same testimonials to appear
   on website 2 in exactly the same manner as they do on website 1.
 * I’ve copied the same code and chanced the URL path but it simply doesn’t work!
 * here is the code used on website 1 which works perfectly-
    <?php require(‘../
   testimonials/wp-config.php’); query_posts(‘showposts=1’); while (have_posts()):
   the_post(); ?> <?php the_content(‘…’); ?> <?php endwhile; ?>
 * All I’ve changed for website 2 is
 * require(‘[http://www.ukpartydj.com/testimonials/wp-config.php&#8217](http://www.ukpartydj.com/testimonials/wp-config.php&#8217););
 * Anybody know a solution to my problem?
 * Website 1 – [http://www.ukpartydj.com](http://www.ukpartydj.com)
    Website 2 –
   [http://www.dorsetdj.co.uk](http://www.dorsetdj.co.uk)

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

 *  [webbrewers](https://wordpress.org/support/users/webbrewers/)
 * (@webbrewers)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/getting-posts-from-wordpress-hosted-on-different-website/#post-4532237)
 * I’d guess it’s because you’re querying content from another database for a site
   that doesn’t have the right permissions to access that database. If that worked,
   I could build a 100 sites a day!!
    Assuming there’s a reason you can’t just have
   everything on one site, I’d google for something like “sharing a wordpress database
   between 2 sites”. Or consider using an rss feed.
 *  [Pioneer Web Design](https://wordpress.org/support/users/swansonphotos/)
 * (@swansonphotos)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/getting-posts-from-wordpress-hosted-on-different-website/#post-4532239)
 * Or we can include WordPress in our HTML site with the proper setup:
 * [http://codex.wordpress.org/Integrating_WordPress_with_Your_Website](http://codex.wordpress.org/Integrating_WordPress_with_Your_Website)
 * (They would both need to be hosted in the same account on the same server)
 *  Thread Starter [djbessant](https://wordpress.org/support/users/djbessant/)
 * (@djbessant)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/getting-posts-from-wordpress-hosted-on-different-website/#post-4532283)
 * Thanks will give them a go and update with progress

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

The topic ‘Getting posts from wordpress hosted on different website’ is closed to
new replies.

## Tags

 * [duplicate](https://wordpress.org/support/topic-tag/duplicate/)
 * [require()](https://wordpress.org/support/topic-tag/require/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [djbessant](https://wordpress.org/support/users/djbessant/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/getting-posts-from-wordpress-hosted-on-different-website/#post-4532283)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
