Luca
Luca

Reputation: 1874

Use Wordpress for static WebSite

I want to create a static website and use wordpress only to "compose" the website. I want to create a template that only use the same header and footer and change the content of the page (home, contact ecc dcc). My site is not a blog or any other type of site that needs CMS I only want to use Wordpress to have only one header and footer and don' t want to change it in all pages when I need some customization to it. I hope I was clear enough! Thanks!

Upvotes: 3

Views: 5664

Answers (6)

ljs.dev
ljs.dev

Reputation: 4483

Disclaimer: I'm dev of the WP Static HTML Output project.

It's been around for a few years and still has 5k+ active installs, but jazzing it up with some more features now and its whole purpose is to allow you to use WordPress for your site development and export to a static HTML version for speed, security and portability.

For the OP, the basic FTP publishing option may be of use. For more advanced cases, there are services like Netlify which can auto build/deploy your static site from a Git branch.

Upvotes: 3

Luca
Luca

Reputation: 1874

Another great solution to this problem is to use a specific software that is created exactly to do that. For Mac, for example, there's a software called Hammer that "compile" your site every time you save and includes your header and footer to the page. Is really useful.

Upvotes: 0

hoppy
hoppy

Reputation: 1

If there's someone else out there wanting to use a static site generator over Wordpress, here's a script called WP Static which does just this: http://mossiso.com/code/make-wordpress-static

Upvotes: 0

AdamJB
AdamJB

Reputation: 452

A bit late to the table on this one but it seems that Wordpress is totally overkill for a static site. Wordpress pages can be cached with cache plugins but when any Wordpress site loads there are a number of scripts and custom php functions that run each time a page loads.

Why not just build a flat file website and simply include your header and footer with PHP? Far quicker to set up and based on your question it seems that this is simply what you need.

Added to this, you won't have an admin area for your site or a database, just the files on the server - surely this makes your site less hackable too. An added bonus is a really easy site to version control with Git or SVN.

Upvotes: 1

Jeff Braaten
Jeff Braaten

Reputation: 366

In the Settings | Reading admin page, choose a static page for your front page display. Build your site out using Pages instead of Posts. Each Page will inherit your site's standard header and footer. Create your Main Menu from the Appearance | Menu admin page to hook together your Pages. Use widgets and standard HTML links as needed. Then dress up your site with one of the many available themes.

Upvotes: 2

TRiG
TRiG

Reputation: 10643

You can create a site in WordPress (or any other CMS) on your own local computer, then save a copy using an offline browser such as HTTrack. Then upload the HTTrack saved HTML to your webhost.

This will make your site faster, as there will be no need to execute PHP on page requests, and the webserver will use its default caching headers. (Also, you get the option of using a cheaper hosting without support for PHP and MySQL.)

Any time you change the site, you'll need to edit the live WordPress version, save it again, and reupload the files.

Upvotes: 5

Related Questions