The Ultimate WordPress Caching Method
By far, the best way to make your WordPress website perform properly is to rely on a quality host, but that isn’t always possible for a number of reasons. So, how do you ensure your website is insanely fast without resorting to bloated and unreliable plugins?
Make WordPress Fast and Secure
The Government of Canada runs thousands of websites for different departments and it has tight security restrictions on what you can and can’t run on a server. When I proposed running WordPress as the CMS for a small department, I was told that it would never happen.
But it did, and the method I used is the simplest, oldest trick in web caching. WordPress runs the CMS but not the website. All the files on the actual website are cached before being uploaded.
Step One: install WordPress on your local machine using MAMP or similar software.
Step Two: configure WordPress to use the plugins and settings you need. Remember to setup your keywords and descriptions to meet your needs.
Step Three: once your site is done and your content is perfect, use a tool such as SiteSucker for Mac or HTTrack for Windows to extract the site from your web server to a folder. This process will copy all the pages and files from your WordPress installation to a folder on your local computer and maintain the file structure for you.
Step Four: depending on the tool you’ve used, you might need to update the links on your site. TextFinderX or EditPlus similar to do a bulk search on the files. This will replace your local URL (such as http://localhost:8888/) with your website URL.
Step Five: upload your HTML files to a website server using an FTP client.
Updating your WordPress Website
Now you should have a fully functional website hosted on your provider without having to install WordPress on your hosting account. If you’ve installed Disqus or Facebook comments, you should have fully functional comments on an HTML powered website but, how do you update the content without WordPress?
Using your local copy of WordPress, you can make changes to the website as a staging server for testing and updating content, then when you want to publish your changes to the live website you can repeat steps four and five above or use a tool such as Adobe Dreamweaver to synchronize only the new files to the live website.
You can Serve Millions of Pages with WordPress on Shared Hosting
While this method of caching is extreme, it’s also extremely powerful because the files used to host your website no longer require the PHP interpreter on your host. In fact, they require no server-side processing and are served as pure HTML to client browsers. This simple fact allows you to serve millions of impressions per month, even on shared hosting such as Bluehost.
In accordance with the FTC Endorsements and Testimonials in Advertising, please note that this post includes reviews or links to affiliate programs. The reviews provided in this post are unbiased and presented a fair manner. This post does not include misleading or paid reviews.


13 Comments
Squrl
Small typo at “use a tool such ad SiteSucker for Mac”. I have been developing something similar to this trick for a client. What I am trying to do is set it up so once the client has wrote a post or a page they just hit publish on the application and it is made straight into pure html.
02 Sep 2011 01:09 am
Christopher Ross
Thanks Squrl!
04 Sep 2011 05:09 pm
lorenzo
Hi Chris,
I’m really Amaze by this Stupendus Tip, really never heard of that before.
Just a Question: does the ‘local’ WP need to be continuosy Synched then? I do mean, the ‘local WP’ -our said machine laptor or desktop- need to be running 24/7/365 to conmtinuosly synch with the Html folder on line?
Thanks again
really great potential here, and without Messy CDN
26 Sep 2011 10:09 am
Christopher Ross
Hi Lorenzo, no the interactive version (where you make updates) can be run in a limited capacity or full time, depending on your needs. Personally, for this I would suggest creating a firewalled version of WordPress on a local machine within an office structure, then deploying automatically after updates but running from a laptop via localhost: and then deploying when you feel the need is just as easy.
It's a rather drastic step but it does remove virtually all the caching and security concerns which could be raised by those with concerns.
26 Sep 2011 11:09 am
lorenzo
Hi, Absolutely Agree.( new sort ov Vodka
)
Also, and given most WP lovers refer to a low budget market, read it as not skilled customers, this it’s really great as caching method, expecially assuming the site will not be update (sadly) for long times.
I see myself where an excess of 30% customenr do not post or write anymore to their ‘site’ after it’has been done -paid- and set up.
Thanks againg I’m already tring it out
28 Sep 2011 08:09 am
Christopher Ross
How'd it work out for you Lorenzo?
17 Oct 2011 09:10 am
Yannick
To Cris: excellent summary & idea, many thanks. Was just looking for something like this. I am getting experience with WP & MAMP, but may need a little coaching to ensure proper setup (firewall, etc). Would you give me a hand if need?
Also a question: are they some things which would snot work with such a caching? I am thinking about additional plugins which would require the php server… What about serving the web site in different languages for example, or to offer some interactivity with users?
Thanks again Cris!
29 Nov 2011 03:11 pm
Christopher Ross
Yannick, if a plugin requires real time processing (such as a clock or a script to detect user location) it would not work. Otherwise, this method should be excellent for you.
30 Nov 2011 02:11 pm
Yannick
To Squrl Looks a great idea! I am searching for an easy way to keep my offline/local version in synch with the online version… Any news from your side on this?
Chris, you may have a better way to automate the transport process?
Thanks guys!
29 Nov 2011 03:11 pm
Yannick
Chris,
Many thanks for your answer, I still have a doubt though…
I do get the pint for all static pages, common to any user: caching this way will be GREAT!
But
1. what about pages which are interactive with the user, such as one with possibilities to leave ranking / comments , or for user to register to an event, etc? We would need a php server to handle these submissions, no? If only static html pages, the server would not have the “intelligence” to process these submissions, no?…
2. For page which are served differently to different users, I think we would also need the php server to handle the calculation: I mean for example if you have some pages/section which are secured/protected only to registered users (subscription model)… Or if a registered user can see the full page, versus anonymous user would see only the intro?
Do I miss something?
If I am right, and I would need a php (wordpress) server for these pages / sections, would still be able to use your caching approach for some other pages, such as the heavy home page? A mix model may be fairly interesting then, but I am a bit worried about the confusion / complexity / mess it may create… How do you see this with your experience?
Many thanks!:-)
Yannick
08 Dec 2011 06:12 am
Christopher Ross
Hi Yannick, in the case of a page that needs to be customized for each user you're correct that this method would not work well.
I had a situation recently for example where we wanted to cache a newspaper using a method like this, the comments used JS so we had no issues with interaction but we needed to check that the user was using a desktop vs. a mobile device on each page load, which meant this method could not be used.
08 Dec 2011 12:12 pm
Jay
Awesome tip. Question, how would this work with sites that contain video??
15 Dec 2011 10:12 pm
Christopher Ross
Jay, assuming you're using something like VideoPress or YouTube the caching will take care of that for you.
17 Dec 2011 03:12 am
Leave a Comment