Is CMS caching needed while it runs on Varnish Cache? - wordpress

I know that the question seems weird but i am really not sure about it.
I am running a bunch of Joomla, Wordpress and Magento websites and i am not sure if there is a need to enable build-in CMS cache while they run on varnish.

Yes , Of course that is needed
varnish and other caching tools just cache the static part of your website
but Joomla cache system is more powerful and doing the backed cache part of your website , for example some components force Joomla to dont cache their content as they are depending on users action or user status or ...
so Joomla will cache the pages that are same for all users and will show to them this pages from cache without many database query and ACL check and ...

Related

WP Super Cache to create a static version of the full site

I'm working on a WP project where the live site can't use WP (for security reasons). My solution was to build the site on a local server using WP, then export a static snapshot of the site (using WP Super Cache) that can be uploaded to the live server.
I have a gulp script to package the entire site:
Get the static files generated by WP Super Cache
Copy all assets (images, uploads, etc).
Copy other necessary files like .htaccess.
Problem
When using WP Super Cache I've noticed pages are missing from Super Cache. For example, my site has 82 pages but my cache contains only 65.
What are the settings in WP Super Cache so the entire site is cached into the WP Super Cache directory?
Or, is there another plugin better suited for caching all the pages?
I wouldn't use a caching plugin (or any other plugin) for this as they are not made for this purpose and would need (extensive) modification not only now, but also down the road when the plugin gets updates.
I did exactly what you are planning, on a larger scale of a couple of thousand Wordpress sites. I deployed those sites statically - also for security reasons - with a PHP script that does essentially this:
Get a static version with wget (you will need some parameters for recursion, attachment rewriting etc.)
Modify anything you need in the html files (you could use sed for this).
Copy assets (depending on your needs and on the wget configuration)
With a tool like grunt you could even run more tasks, like minification, uglification and image compression once you finished creating the static copy.

WP Super Cache: create cached files of all the pages

I'm using WP Super Cache as the hosting recommends.
I guess that WP Super Cache creates a cached file the first time somebody visit a page of the website. I want to cach all the files at once, so my idea is to open all the pages of the site.
I wonder if I download the entire website with wget, all the pages will be cached.
WP Super Cache has a "preload" mode which you can find under it's settings. It's exactly what your searching for and does what you say it does, it simply "simulates" a page visit.

Host complete WordPress website in Amazon CloudFront or any other CDN

What I would like to do
According to a Amazon Senior Architect to whom I spoke recently, it is possible to cache dynamic website content in Amazon CloudFront.
The way I understand how this could work, is that in addition to doing a page cache of each page which has been accessed, cache the page in CloudFront too.
What I have tried
I have experimented a lot with W3 Total Cache and its settings but did not find a solution to this problem. I also have tried to set up CloudFront directly in the AWS control panel but did not find a way to cache the static result (html?) of WordPress's php calls.
Question
How would you tackle the issue?
How can I cache a static version of WordPress's dynamic pages in CloudFront or any other CDN?
Here is a concept plugin which aims to do this:
https://github.com/PeterBooker/wp-cloudfront-helper
most CDNs advertise that they can cache dynamic web sites. Unless they have very specific information about the pages they need to serve, they can't. There are situations where the "penalty" of a CDN for a dynamic page isn't that bad, but having an additional hop in-between the web server and the end user can only be faster in some very specific situations. The main reason is the absense of a Last-Modified header for the generated pages.
From my experience working with (at) CDN providers, the most performant way to include a CDN is to use a different hostname for the static assets and point that hostname to the CDN with your web server as the origin server.
Jan

How to push wordpress from mamp into hostgator

I have done a blog in mamp and would like to push into hostgator. Must i recreate everything in hostgator like Installing Wordpress on Hostgator. Is there any way i could just push my stuff straight into hostgator without redoing everything in hostgator. Need some suggestion.. Thanks..
It's quite easy to deploy a local version of Wordpress to a live server. First of all, you are right, I would not bother installing a clean copy of Wordpress on your server, you'd then have to totally rebuild the site.
What you need to do is;
FTP all your files from your local machine to the server.
Transfer the whole database from local phpmyadmin to a new database on the server
Change the database connection details in wp-config.php
Make any necessary changes to your default Wordpress .htaccess. What I mean here is that your MAMP site probably isn't in the root but your live site probably will be. If you have SEO permalinks set up then you would remove the Mamp subdirectory from the rewrite rule and the base in the .htaccess. Your host might also require you to add rules here (ie specifying which version of PHP to use etc). You could always install Wordpress using their installer to see if they add any special rules themselves.
All easy so far - now comes my tip. Moving Wordpress databases from your local development environment to live can be a massive pain because Wordpress (and lots of plugin/theme developers) use serialized arrays to store data. So if you do a find-and-replace on the database to replace your old url with the new one, you will disable lots of things like config settings and widgets (text widgets specifically, but there's loads of stuff you end up having to recreate).
Download this file;
http://interconnectit.com/124/search-and-replace-for-wordpress-databases/
and upload it to the server and access it directly in your browser. Run through the quick form and perform a serialized array-friendly find and replace on your database urls. Job done. Good luck.

Updates to Wordpress theme template/stylesheet are not reflected when a file is edited

I am developing a theme in Wordpress. I have an issue where updates to my stylesheet (style.css) are not being reflected in the browser after FTPing a new version of the file to the server. Edits will only show up in the browser after waiting a long time, (15+ minutes). I have tried all the things mentioned here (edit: now updated to address the issue), which have not worked. These include:
Making sure no caching plugins are installed in Wordpress
Clearing the browser cache
Trying from a different browser
Making sure I am editing and accessing the correct file
Checking webhost configuration panel for a caching plugin
Something seems to be caching the stylesheet but I'm not sure how this might be so.
It turns out that my hosting company (Certified Hosting) uses a webpage caching plugin called Varnish on their shared servers. Unfortunately there is no mention of this in the configuration panel - the only way to disable it for the domain is to submit a support ticket. Once they fixed it on the backend, my changes are now correctly being reflected without having to wait a while as before.

Resources