Live data from Hacker News

Build Static Websites

eager.io

1–10 of 60 posts

Re: Build Static Websites

#2
How do plugins like WP Super Cache https://wordpress.org/plugins/wp-super-cache/ compare with straight HTML pages? The extra overhead is in the PHP serving up the cached HTML page, but how effective is it in comparison? More of the static site development setups don't have an admin system that compares with WP, is there a WP plugin to export to a static site?

Edit: WP caching benchmarks http://cd34.com/blog/scalability/wordpress-cache-plugin-benc...

Re: Build Static Websites

#3
post #2

How do plugins like WP Super Cache https://wordpress.org/plugins/wp-super-cache/ compare with straight HTML pages? The extra overhead is in the PHP serving up the cached HTML page, but how effective is it in comparison? More of the static site development setups don't have an admin system that compares with WP, is there a WP plugin to export to a static site? Edit: WP caching benchmarks http://cd34.com/blog/scalabili…

> is there a WP plugin to export to a static site?

Here is one I found [1], I've never used it though, so I don't know how good it is. I'm sure there are others as well. It would be nice if there were a static site generator with an interface as nice as WP.

[1]: https://github.com/megumiteam/staticpress

Re: Build Static Websites

#4
post #2

How do plugins like WP Super Cache https://wordpress.org/plugins/wp-super-cache/ compare with straight HTML pages? The extra overhead is in the PHP serving up the cached HTML page, but how effective is it in comparison? More of the static site development setups don't have an admin system that compares with WP, is there a WP plugin to export to a static site? Edit: WP caching benchmarks http://cd34.com/blog/scalabili…

> is there a WP plugin to export to a static site? Here is one I found [1], I've never used it though, so I don't know how good it is. I'm sure there are others as well. It would be nice if there were a static site generator with an interface as nice as WP. [1]: https://github.com/megumiteam/staticpress

It would be nice if wordpress itself had the option of pressing a button saying - push to static. When you make an edit -> update static files. This would be fantastically easier + it would potentially mean 1/4 of the web gets faster overnight.

Re: Build Static Websites

#5
post #4

Earlier quoted context omitted.

> is there a WP plugin to export to a static site? Here is one I found [1], I've never used it though, so I don't know how good it is. I'm sure there are others as well. It would be nice if there were a static site generator with an interface as nice as WP. [1]: https://github.com/megumiteam/staticpress

It would be nice if wordpress itself had the option of pressing a button saying - push to static. When you make an edit -> update static files. This would be fantastically easier + it would potentially mean 1/4 of the web gets faster overnight.

+1

oh man, that's a great idea, that would grow WP adoption rate by 1000x

Re: Build Static Websites

#6
Absolutely, take static as far as you possibly can. In a world with S3 and Cloudfront, there is really no reason for a static site to ever be down. This is great for a company's marketing focused web presence. But often the reason you're getting all those visitors to your site in the first place is that it does something valuable that requires data persistence, which usually implies user sessions, which implies authentication flows, and all of this requires being able to serve dynamic requests at scale, so you need to figure out how to do that as well.

But we definitely serve too much of the web from dynamic php sites that could easily just be HTML files sitting in a cache or on a file system.

Re: Build Static Websites

#7
post #4

Earlier quoted context omitted.

> is there a WP plugin to export to a static site? Here is one I found [1], I've never used it though, so I don't know how good it is. I'm sure there are others as well. It would be nice if there were a static site generator with an interface as nice as WP. [1]: https://github.com/megumiteam/staticpress

It would be nice if wordpress itself had the option of pressing a button saying - push to static. When you make an edit -> update static files. This would be fantastically easier + it would potentially mean 1/4 of the web gets faster overnight.

Why should it be a button, rather than having anything affected by a change automatically re-generated with cache control headers updated properly?

Re: Build Static Websites

#8
post #5
post #4

Earlier quoted context omitted.

It would be nice if wordpress itself had the option of pressing a button saying - push to static. When you make an edit -> update static files. This would be fantastically easier + it would potentially mean 1/4 of the web gets faster overnight.

+1 oh man, that's a great idea, that would grow WP adoption rate by 1000x

It literally couldn’t grow that much. It can only go from 1/4 of the web to 4/4 of the web. :)

Re: Build Static Websites

#9
post #7
post #4

Earlier quoted context omitted.

It would be nice if wordpress itself had the option of pressing a button saying - push to static. When you make an edit -> update static files. This would be fantastically easier + it would potentially mean 1/4 of the web gets faster overnight.

Why should it be a button, rather than having anything affected by a change automatically re-generated with cache control headers updated properly?

I was really meaning when you hit publish it would auto-reflow all the static pages. The great news is WordPress could come up with a static way of using javascript for things like sidebars so you wouldn’t necessarily have to repaint every page with every blog post.

Something like call partial (list of recent blog posts) which itself could be static. Two-to-three static calls and you could have a very clean and robust system with no database queries.

Re: Build Static Websites

#10
post #6

Absolutely, take static as far as you possibly can. In a world with S3 and Cloudfront, there is really no reason for a static site to ever be down. This is great for a company's marketing focused web presence. But often the reason you're getting all those visitors to your site in the first place is that it does something valuable that requires data persistence, which usually implies user sessions, which implies authe…

Just to take it a step further though, in a world where every browser can run Javascript and make AJAX requests, which of your requirements can't be handled by the client communicating with an API directly? Considering sessions for example, local storage is supported by virtually every browser you can name: http://caniuse.com/#feat=namevalue-storage

In my experience, it's significantly easier to scale an API than a traditional (PHP-style) web server.

Post reply on HN