Support » Everything else WordPress » Embedding pre-existing program driven page/s into WP site

  • Hi,

    I have existing content which is program driven.

    (One version of it is written in PHP. It talks to a back end web service to populate drop downs and initiate actions in the service.)

    We’re looking at ways to use that content in a WordPress site (which is under construction).

    The idea is not to do much additional work other than adjusting appearance (using CSS etc.). In other words we’re not currently considering rewriting the code in any significant way.

    The code and content is currently checked from time to time to ensure that it has not been tampered with. This is done using FTP.

    In this situation there’s a few solutions, but an ideal one would be to embed this content into the WordPress site.

    I’m not particularly familiar with WordPress architecture, so would appreciate feedback on:

    1. Is this feasible?
    2. If so how?
Viewing 11 replies - 1 through 11 (of 11 total)
  • If you want to move to WordPress, your best course of action would be to migrate your content to the new platform. If you try and cobble together a hybrid of old and new, you’re looking at potential performance problems down the line and an additional single point of failure.

    Depending on your current platform, there may be an existing migration route.

    I’d hoped the post was clear.

    Here’s a little more detail.

    The WordPress site is a brochure style site. The active page does something very different.

    Versions of the active page are used on other sites, so no desire to reinvent the wheel.

    The WordPress setup is in fact being done by a different team than the active page.

    So the question remains!



    very awesome

    It is possible, but as to how, that’s going to depend on your system. The “easy” way is to use include() or require() to include your external script into your WordPress function or file. Other ways can be done by using CURL or similar to retrieve the output from a URL. There’s also other protocols like XML-RPC or SOAP that will all work, but depend on how your script is set up there.

    Let me illustrate what I’m thinking about.

    Here’s a link to an image that illustrates

    The image shows an installation of WordPress. On the server I create a directory with the web page in it. (All self contained, all in one directory, makes no use of WordPress templating, uses the PHP installation that drives WordPress.)

    The page/s are then directly referenced from WordPress driven pages.

    The directory with this material is accessed via FTP in the usual way.

    1. Have you done that?
    2. Any issues known?
    3. Operational experience?


    very awesome

    That’s all fine and wil lwork. BUT… My question still remains about how you intend to “reference” the page/pages from WordPress? Are these stand-alone pages, or is the content being included inside a WordPress page template?

    (All self contained, all in one directory, makes no use of WordPress templating, uses the PHP installation that drives WordPress.)

    catacaustic > Answers your second question, does it not!

    Is there a problem entering a simple root relative URI as a WordPress link?

    (Failing that I assume a fully qualified URI will work.) If I’m wrong there please let me know.

    The questions about doing that remain. Anybody here had experience doing this?



    very awesome

    You can enter any URL that you like as a link. There’s no restrictions on that. But I would suggest using full URL’s, not relative. This is mainly becuase when WordPress gets it’s permalinks set up, it can look like folders, so relative links won’t work from all of the pages (that’s why WordPress stores everything as complete URL’s).

    I guess that bit does answer my question to a point. It was confusing when you said that as I took it that you wanted to use the WordPress system, not just PHP by itself. Doing it that way will work without any problems.

    I think it’s a good idea to always use root-relative links.



    very awesome

    No, it’s not. 🙂

    What happens when your root is in a sub-folder? I’ve done a few sites that do this. If you linked to ./page/ but your sites root is your link would be pointing to not And that’s obviously not what you want.

    Your case might be different, but I’ve found over the years that a complete URL as a link is the easiest by far because it removes any chance of ambiguity. You know exactly what it is and exactly where it’s going to point to no matter what page it’s on or what directory level it’s at. It makes life a whole lot eaiser.

    You misunderstand what I mean by root relative.

    Root relative always starts with “/” so it always points to the same place from wherever in the site you are.

    As far as I know that’s a standard way of referring to this idea, i.e. see (I’ll assume you’re not winding me up!!).

    Your dot notation example, or others with the double dot (..) are decidedly not root relative. (If I find myself working on a project including this stuff, I either stop or convert everything that I’m going to touch.)

    There is a possibility that WordPress works differently from web sites, PHP… so if that’s the case I’d be delighted to get the details.

    (A benefit of root relative is that code can port between web sites more easily.)



    very awesome

    The dot is part of the root-relative notation that I’ve seen and used before, but it still works the same way – with or without the dot in front. The single-dot is just a left-over remnant from older Unix file-system days. The single dot is optional, and it means a very different thing to the double-dots.

    Linking to /page.php from will still point to and not That’s the problem that I have with that sort of linking. It is my own preference for not using it because of that, but if it works for you then that’s fine. It’s just something that I’ve found to be very troublesome in the past moving files and links around between folders.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Embedding pre-existing program driven page/s into WP site’ is closed to new replies.