• Resolved itotallyjustmadethisup

    (@itotallyjustmadethisup)


    Here’s the deal:

    I’m the website administrator for a college club. This club’s website is hosted by my college on their servers. Unfortunately the servers only support flat HTML serving and nothing more. As a club we are _required_ to host our website on these servers and are forbidden to get hosting on any other school server.

    Our current website with flat HTML pages is rather boring and hard to extend. A WP installation would be ideal but unfortunately php and mysql aren’t an option.

    My question is this: can we do a local WP installation (say on someone’s home computer) – add all our desired content – and then take some sort of “snapshot” of the entire site as flat HTML and use that? Simply upload all the generated pages to our server?

    Ideally this solution would involve a simple WP plugin or something that was equally easy to use. I personally have a somewhat decent technology background but I’m concerned that future club member’s (whose job updating the site may become one day) won’t be.

    Thanks in advance for your help.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter itotallyjustmadethisup

    (@itotallyjustmadethisup)

    I looked into wp-cache and staticize but they’re not going to fit my needs.

    Namely the server I’m trying to transfer all my files to (as flat HTML files) doesn’t support php. So the output files with .php endings won’t work.

    Any other input would be greatly appreciated ??

    Take care.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    My question is this: can we do a local WP installation (say on someone’s home computer) – add all our desired content – and then take some sort of “snapshot” of the entire site as flat HTML and use that? Simply upload all the generated pages to our server?

    Not without it being a major pain in the rear, no.

    My advice: Work the political angle. Get your college to add support for this century’s technology.

    Moderator Dion Hulse

    (@dd32)

    Meta Developer

    Theres plenty of software that’ll mirror a website, Just get wordpress running on a local machine, run such software to create a mirror of the website, and upload the mirror to your college site..

    ..And push for them to support this centuries technology as well.

    D

    There’s a great software package available called wget that can help you pull down a whole site as static html.

    Your best bet is to change the permalink structure (found at https://www.your-wordpress-site.com/wp-admin/options-permalink.php) to something you can quickly convert and likely, you’ll have to globally edit links after they’re created but it’s a pretty simple task.

    Good luck!

    Hrm… you could always try having the site actually hosted on WordPress.com (or some other external blogging site), with your index on the school’s server set up so that it displays the external page (and you could use your school space for images and other files and whatnot). True, your site wouldn’t totally be hosted on the school’s server, but I doubt that anyone would really notice and/or care enough to raise a fuss about it.

    But yeah, getting the college to support php would probably be cool too!

    Thread Starter itotallyjustmadethisup

    (@itotallyjustmadethisup)

    wget is a good recommendation – it was a route I was actually looking into. I had the best luck with:

    wget --html-extension --recursive --page-requisites <site-location>

    Unfortunately it will generate a flat html-ified version of the site where all the links are set to my local machine.

    I’m going to see if I can pipe this through sed to clean it up and make it work. I’ll post back.

    Thread Starter itotallyjustmadethisup

    (@itotallyjustmadethisup)

    The final wget incarnation was ultimately unsuccessful

    wget --html-extension --recursive --page-requisites --mirror <site-location>

    Although this was successful in downloading all the requisite HTML pages it did not grab up the images found in the themes/default/images folder.

    I suspect this has something to do with the internal workings of wget and the fact that these images are referenced in the HTML as

    #page { background: url("https://<your_site>/wp-content/themes/default/images/kubrickbg.jpg") repeat-y top; border: none; }

    Also, I looked into httrack but unfortunately it seemed to generate some spurious files that I wouldn’t want to upload to the simple server. For example two files named ‘new java.net.URL(window.location.html’ and ‘GET.html’ which are simply non-existent files on the local installation and thus show only 404 responses.

    wget seems to offer the best route but I can’t seem to get it to see the linked images somehow. Sure I could specifically copy over the folder but ideally this should be a fairly simple fix that others could implement in the future.

    Perhaps some input on how to get wget to recognize the image links? Or maybe another program that would do what I’m trying to?

    Thanks all.

    Thread Starter itotallyjustmadethisup

    (@itotallyjustmadethisup)

    @ wes

    Hrm… you could always try having the site actually hosted on WordPress.com (or some other external blogging site), with your index on the school’s server set up so that it displays the external page (and you could use your school space for images and other files and whatnot).

    Any input on doing this? Can I really just completely pull in another site wholesale transparently this way?

    @ otto42, dd32

    Get your college to add support for this century’s technology.

    *throws hands up in air* You’re not kidding. The school (to their great credit) is outstanding at funding university clubs. Quite literally to the tune of +$100,000 a year in aggregate. Then they turn around and _require_ us to host our websites on a server that probably runs DOS.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    wget doesn’t understand CSS and a lot of the “Web 2.0” stuff, which is why I did not suggest it.

    You could always host your site where you want to host it and then stick a page with a big FRAME on it at the school’s site. ??

    sigh. I’ve been down the very same road as you — though this was about 10 years or so ago. What you have to do is build a critical mass of people around you that understands why your project is going to benefit them. Do this informally with your superiors, get them to agree to let you run a local test server to demo your app. (I had to run a server out of my cube for a while before the college finally agreed to serve up dynamic content.) When you get enough buy in, do a formal presentation, with your demo as proof of concept. The gist of your presentation: Dynamic content, Good; Static content, Bad. They just might get it.

    Thread Starter itotallyjustmadethisup

    (@itotallyjustmadethisup)

    I’m going to put this thread down as resolved.

    The final verdict: I couldn’t find a suitable way to convert the entire site to flat html for serving on a server that doesn’t support php or mysql.

    There was some hope in wget and httrack but they weren’t 100% effective.

    wget seems to offer the best route but I can’t seem to get it to see the linked images somehow.

    I think wget doesn’t parse/retrieve URI references within CSS, only in HTML.

    What you could do is change all those URIs in the stylesheet to absolute paths, e.g.

    #page { background: url("/wp-content/themes/default/images/kubrickbg.jpg")

    and then upload the whole theme folder at the same location (/wp-content/themes/default/) so the paths are the same.

    You’d probably only have to do that once.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Entire WP Site –> Static HTML’ is closed to new replies.