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:
- Is this feasible?
- If so how?
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!
It is possible, but as to how, that’s going to depend on your system. The “easy” way is to use
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 http://www.freeimagehosting.net/newuploads/tnk7p.gif
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.
- Have you done that?
- Any issues known?
- Operational experience?
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?
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.
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
www.site.com/blog/your link would be pointing to
www.site.com/blog/page/. 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 http://www.motive.co.nz/glossary/linking.php (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.)
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.
www.mysite.com/blog/will still point to
www.mysite.com/blog/page/php. 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.
- The topic ‘Embedding pre-existing program driven page/s into WP site’ is closed to new replies.