So there is a lot of posts on the internet about how to convert your XHTML+CSS theme to WordPress, but I have a WordPress theme and want to convert it (or un-convert it) back to just XHTML+CSS.
Has anyone done this before? Anyone know of any resources (tutorials etc.) that I can use to help me do this?
Thanks
WordPress renders html. If you want a static version of your wordpress site you could use Wget.
Visit the WordPress web page in question, right click on the page and select view source. This will give you the XHTML. You can then find the CSS by going to the files linked in the header
Let’s open the source code with your fave editor & replace WordPress functions with some test texts. If there’s an
include
orrequire
statement, replace it with the destination file’s contents.On the other hand, you can run it on a server and just save the page as HTML. You’ll have the static theme.
You could also try this a plugin called Really Static, which generates static files for you.
You could also do it the hard way and rip appart the php files (removing the
First would be header.php, then single.php (or page.php or whatever page style you are trying to copy) then the footer.php
This would allow you to do it without a webserver.
I tried this:
wget -l2 -r -p -k -E http://www.example.com/
It works great as far as it goes, but it does not pull over images in the CSS File, so you’ll need to ftp over or upload the theme files.
Also make sure you’re wordpress site is using “Pretty Permalinks” so you don’t end up with wacky urls like (http://www.example.com/index.html%3Fpage_id=2.html).
This might be a pretty good security measure as well. Try hacking a static site.