0

I have a prospective client whose current site is a combination of HTML pages and a Wordpress news blog. The blog has hundreds of entries and the client wants to leave that in WP rather then attempt to import to EE. Importing would mean a massive amount of tedious manual transfering of data.

So the question is - is it possible to run an EE site that incorporates a WP blog? Can WP run in a subdomain then somehow display WP posts inside an EE template?

I know this is not ideal but this is what they want.

2 Answers 2

2

Just to add to @jrothafer's answer, this should hopefully sort your import issue:

Data Grab

Article on importing Wordpress site into EE

And I'd have to highlight his statement regarding maintenance - you have to keep Wordpress up-to-date otherwise it's a security risk, although it's good to keep EE up-to-date, it's not essential due to it's security and stability. So will increase maintenance and support time/costs.

2
  • Hrm, I could have used that article on importing WP posts into EE a ~month or so ago! Good reference sir!
    – jrothafer
    Feb 7, 2016 at 0:50
  • I've tried running two system simultaneously and while it can be done, we've had a few instances with user error or confusion on the two differing systems, as well as putting content in the wrong system (wp for news, ee for articles, vacancies, and everything else) so moving content to the correct channel/system was tedious. In the end, migrating everything once with Data Grab and moving to EE ended up being the best solution. Very little pain at all too..
    – Holland
    Feb 8, 2016 at 9:06
1

Well, there are ways to run the two next to each other, or even easier is one inside the other. For example; you create a sub-folder in your main EE installation and run WP in that:

ExpressionEngine --> www.domain.com/
WordPress -->        www.domain.com/blog/

Your WP site would need to be configured to run the blog roll as it's home page. You'll be able to share CSS and JS assets between the two easily enough, but you'll have to manually update templates in both EE and WP when you make changes you want to match in your global (combined EE+WP) site.

I have personally imported WP posts into an EE channel before. It was a pain in the ass and basically required constructing a bunch of regular expressions to separate out different parts of the WP posts and input them in to corresponding EE entries and fields. It did require some manual review to fix little content issue imports, but it was by-and-large an automated import and not a full manual import. The viability of writing an import script depends on your use cases and also on the consistency of the blog posts.

You could, say, create a channel with matching fields to a WP post (title, url-title, featured image, content (as, say, a Wygwam field)) and just directly import them like that. Again, depending on the blog use-case and consistency, this is possibly viable.

Another possibility is to use the query tag to query the WP posts in a special template for the blog. But this is barely scratching the surface of the complexity of creating a template group that scrapes from the WP posts table. But I see this possibly doable. It also depends on how complex the WP blog is (WP posts are flat, or are there all sorts of categories a post could be tagged as? How about file assets?).

Overall, I would personally recommend writing an import script. You say hundreds of entries; that's pretty easy to review after a script import. If it were thousands than I'd not consider it.

If import really isn't an option, running WP inside of a sub-folder of the EE web-root is your next best option. It will require a lot more maintenance if the site is to have a global matching theme and header/footer element structure.

Past that, I wouldn't touch it. Why is the client moving to EE if they don't want to utilize it's advantages over WP? And the legacy maintenance of watching a single blog... and I haven't even touched the worst part: are they going to want to write new news blog entries in EE, but still have them mixed with the old WP posts? Not happening (welllll sure, doable, but crazy amount of hours writing a very complex custom module to mix the EE Channels Entries tag with hand-written WP posts reader methods and... oh god, WHY?).

Edit

Oh and if you wanted to run WP on a sub-domain and just import rendered views instead of moving the installation to a sub-folder, you can use mod_proxy. But this is another rabbit hole; use a sub-folder for this option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.