Question: Static output possible?
-
I’ve spent some time looking over WordPress, but since I am not at all familiar with PHP or dynamic content management systems, one major question remains.
Currently, I use Movable Type, and the way I have it setup it generates several textfiles (one for each blog, one for each category of each blog) for recent entries, which I then use SSI to import into my otherwise static .html pages.
Can anything similar be accomplished with WordPress?
-
Linda,
At this time, WP does not directly create static pages, but it is on the list of things to do. I’ve talked with a developer about it, and I am confident that it is in the near future, rather than the distant future when this witll happen.
HTH.
Craig.You can always import static pages into you design, or have links to static pages from the dynamic index.php. However, you can also have pseudo-static pages (my About section is like that), that look static to the user but are pulled normally from the database and dynamically generated.
Do a search on the forums for “static” if you want more thoughts.
-d
https://www.chait.netThanks for the replies. ??
It sounds good that static output is in the works, so I might hold off on switching over until that happens.
The way I have gotten used to managing my site doesn’t really work very well for having static pages pulled into the dynamic ones, or having pages that appear static but are pulled from the database.
I do most of my work on the site offline, and I find it a lot more awkward to have to update templates or content in a database compared to just being able to upload my static pages and have the only generated content be pulled into these using some inclusion method. And since most of the site is static, it just seems to make more sense to pull the dynamic content into the static pages rather than vice versa. My blog isn’t even on the index page, it is just pulled into numerous sub-pages of the site where I want to display little news snippets.
I am considering possibly switching from .html to .php endings with my next redesign, but I’d still be looking at using php includes (instead of ssi includes) rather than fully generating each page, and if I understand correctly, WordPress wouldn’t currently work with this method either?
Actually, can WordPress currently have multiple index templates, for example one including the whole blog and one for each category including just teh category entries?Actually, can WordPress currently have multiple index templates, for example one including the whole blog and one for each category including just teh category entries?
yes, i use different templates for my individual archives, category archives, my contact form, index page, and linkblog.
If you’ve got a system of static-based pages that’s working well for you, and you’re not overly keen on a database backend, you might want to consider blosxom.
Linda –
I also should point out that it sounds like you’re doing semi-dynamic setup already. You have ‘static templates’ that you then bring dynamic (text file) content into to render as part of a page. If you migrate your MT content over, that becomes posts in the DB, and your index (or multiple index’es) become the ‘static’ frameworks.
-dLinda, to my best understanding, whats in the pipe for WP is a version that supports caching, which would prevent high CPU loads.
Unlike MT, there is only one template to edit in WP, index.php, and you can take the same index.php and change it to do your bidding, and call it somethingelse.php.
even if you want to include just a couple of lines/posts from the wordpress system, in a page, you have to have a lot of wordpress code in that page to be able to do that.
You never have to change anything in the database directly, you can edit the templates offline, if you wish to, using dreamweaver or other editors. The templates are not stored in the database. The database has raw data related to articles, user, categories etc.
If you wish to switch you could do it now rather than wait for the WP version that will support static or at least optionally non-dynamic pages.
https://faq.wordpress.net is a little something I’ve been working on, which is 100% wordpress, and yet different from a normal install in many ways.Again, thanks for all the replies. Lets see if I can sort through them and give some coherent responses. ?? I think I am starting to understand how things works, but I may be wrong. ??
I like the idea of a database backend as such, and I suppose it is correct that what I am using is a semi-dynamic setup. I am, in fact, already using MT’s mySQL option, so a mySQL backend is just fine as well.
If I am understanding this correctly, I could migrate my site to .php rather than .html endings and then put the various php database calls (or whatever they’re called) into as many of these .php files as I want to pull in WordPress content into, mixing it with the static content? And I could, for example, pull in all recent entries into one file, and in another I could pull in just a few recent entries from a specific category?
If my understanding is accurate, that sounds like it would work pretty well, since I could still work on the actual pages offline as I am used to. It’d just be a matter of finding a good way to redirect from .html to .php (but I believe it can be done in .htaccess) and learning at least something about how php works, in particular php includes to replace my SSI.
Can anyone recommend any good guides for starting off with php? I don’t really want to learn the language, as such, just learn how to setup php pages and do some basic stuff. ??In particular (since it seems you can’t edit your post), I am looking for guides that show how you can replicate the most common things done in SSI with PHP.
Also, do perl/cgi scripts work on .php pages? I presume I’ll need to change anything referring to .html, but that should be doable … I think.Hi,
I’m a WordPress newbie looking fo anyone familiar with Blue-Bye-Bye theme. It has static links and I want to amend them but am unsure what file to edit.
Also how do I correct te errors on the Valid XHTML. Please view here
https://miriadz.com/blogThanks in advance
haha wow, this is a year old thread that you pulled up…
You’re using WP 1.5 which has the pages function while 1.2 did not. In order to edit those “static links that’re on your site, you’ll most likely have to go into your header.php file and edit them in there.
The valid XHTML errors, just follow what the webpage tells you to do to fix them.
How may I get nice urls on my blog?
Dredging up an old thread here but NuclearMoose suggested back almost 2 years ago that static page output might a reality in the “near future”. Any word on the status of this enhancement?
I’m interested from two levels:
1) It would be nice to be able to output my entire blog to static html pages to give mysql and the server processor a break. I have a links program that does that and the site that’s on is incredibly fast. Of course some dynamic features would have to be turned off, like comments. Also, after any new post or update you’d have to regenerate the site. Not too big a deal unless you update very often. X-cart also has the ability to export your entire shopping cart catalog for easy search engine spidering and fast browsing, until you need a dynamic component.
2) Selective static output. It would be nice to be able to easily output a static (non-dynamic) html file for the most recent post so I can easily include it on a non-Wordpress page of my site using an SSI (server side include). Even better would be the ability to specify the number of characters per post to output in case someone has a small area of their web page to put the most recent blog entry on, for example.
I thought I saw someone had whipped up some kind of static output ‘dump’ for a WP site. Don’t recall where now.
However, for:
#2) You can already use something like your RSS feed to pull data into another site. People use my CG-FeedRead plugin all the time to do just that. As it happens, CG-FeedRead caches the current output for the request in both it’s core internal format AND in the output HTML code. So, you could potentially do an SSI to include that HTML file into a static site.#1) It’s called WP-Cache (well, WP-Cache 2). ?? It caches static generated versions of pages, significantly reducing load on the server. If the page is in the cache, it doesn’t need to regenerate it (well, based on some timeout or other plugins marking stuff invalid…).
-d
Thanks for the reply David. I tried CG-FeedRead and ultimately couldn’t get it to work right for my application. I’m sure it’s me and not your plugin but after 4 hours of tinkering with it I had to stop. One of the biggest issues was the ability to output a certain number of characters. If I feel wordy and write a long post, it messes up the layout of the page I’m including it on, but sometimes I need to be wordy. But again, thanks so much for it, especially since you offer it for free and it obviously meets the needs of many.
I do use WP-Cache2 and it works well but I was wondering if there was a way to output static html so I could avoid all the server-vodoo. I just thought it would be neat to use good ole basic html to get the job done. But I concur that WP-Cache2 does work very well.
-Bill
- The topic ‘Question: Static output possible?’ is closed to new replies.