Skip to content

FAQ: Usage

Gido Manders edited this page Sep 1, 2018 · 3 revisions

In the past, I always had to modify my theme to run dynamic code. Don't I need to do that again for this plugin?

For now no; there are some special cases that we will address with an upcoming release for highly dynamic sites.

How can I tell if it's working? Aren't there any statistics at all?

Well yes actually there are, simply enable debug mode on the "General" tab to have details appended to the bottom of your HTML source. Remember that when enabled all visitors to your blog can see these statistics if they view source. Using debug mode does slow the performance of your site so use sparingly.

I'm not a hardcore developer, can you explain to me how this // and / stuff works and how

I should specify the paths for CSS and JS files?

You mean on the minify settings page right? Ok, it's simple:

// tells the plugin to search for the file with the provided path from the document root, e.g.: ///JS/jquery/jquery.JS / tells the plugin to search for the file with the provided path from the server root, e.g. //JS/jquery/jquery.JS

In most cases providing an absolute path is sufficient and most reliable. You can of course use relative paths, but we discourage it unless you really know what you are doing.

Which features can I use if I haven't yet installed an opcode cache or memcached?

Memory caching will not be possible. However you will be able to use both the page cache and minify in "disk" mode, as well CDN functionality without issue.

Which textareas for file entries support regular expressions?

  • Page Cache: Never cache the following pages, Cache exception list, Non-trailing slash pages
  • Database Cache: Never cache the following pages
  • CDN: Custom file list, Rejected files. The CDN fields only support regular expression on the filename.

Examples (Never cache the following pages):

  • Do not cache page/directory and sub pages: /directory*
  • Do not cache pages under a directory: /directory/.+
  • Do not cache pages that contain specific text: /.*text.*
  • Do not cache pages that is named child in directories: .+/child
  • Do not cache any pages named child */child

Note: To disable page caching of specific theme templates or plugin files you need to add define('DONOTCACHEPAGE', true); to it.

How fast will the cache be updated?

Items expire from the cache at a rate that you specify. As far as how fast changes appear to your visitors, they appear instantly in most cases and if you're an administrator who's logged in they will always be immediately visible.

My server has state of the art file storage, why do I need to cache anything in memory?

Even if your server was using an array of solid state disks (SSD), your server's RAM is still going to be faster and introduce less overhead to access than even the fastest solid state drives on a PCIe bus. If you didn't invest in solid state disks for your server, then even worse off - at least an order of magnitude speed difference in read operations in RAM versus HDD. For write operations delta the latency differences is even more pronounced. RAM is the winner hands down. We won't even discuss the blocking and arbitration issues that happen with disk arrays under certain circumstances.

Why would I choose opcode caching over memcached or vice versa?

There's no straight answer for this one. Since WordPress is a PHP-based application, we encourage everyone to install an opcode cache and realize a minimum of 10x performance gain. It will obviously make our plugin faster as well, so again please check out the installation instructions if you do not already use an opcode cache. Once installed, you can select an opcode cache as the method and get back to blogging.

Opcode caching does have a couple weaknesses:

  • If you frequently restart your web server (e.g. apache) especially during high traffic periods, you will lose your cache and your site will slow down as it rebuilds the cache (which happens very quickly). However if you use memcached you would not lose your cache if your web server is restarted.
  • More importantly, opcode caching is best suited for single server environments because the cache is only accessible to the local server, it cannot be shared with other servers in a multi-server (cluster) environment.

It would appear that using APC database caching may be best, but your mileage may vary. So depending on what software you install and how you manage your server, you can choose the options to fit your needs. If you need help with the install on your dedicated or virtual dedicated linux-based server ask us!

I already use HTTP compression on my server, why does it matter if I minify my code?

Let's say you had a file of 10240 bytes, which becomes 2048 bytes when compressed, savings of ~80% (typical for CSS files). That same file will now have an additional ~3x-10x transfer speed improvement when minified. That's a big return from a small operation. The larger your files, the more significant the proportional performance gains.

How do I make some specific pages stay dynamic?

They never stop being dynamic, we just don't create pages that have not been changed. If you have a page that updated frequently in your blog before, it will still remain up-to-date at all times.

Why would I want to cache my feeds?

We feel that caching objects after the first request and checking for updates before responding subsequent requests (which is kind of how web browsers work too) creates more opportunities for interesting applications and mashups where the blogosphere doesn't require institutional investment to be able to handle developers making hundreds of requests every day the same way we use Google, Twitter and Facebook (for example) APIs today. Think about it, even when major search engines crawl your site, they have to be "gentle" so they don't bring it down, let's turn the paradigm around so that every blog can deliver content in real-time in various formats.

How do I cache only the home page?

Add "/.+" (without the quotes) to page cache "Never cache the following pages" option on the page cache settings tab.

Sitemaps are not being cached. How do I resolve this?

Enable "Cache feeds: site, categories, tags, comments" on the "Page Cache" settings tab. Some sitemap implementations are considered by WordPress to be "feeds."

Is it possible to store plugin configuration in a database instead of file?

Yes, but you should note that many types of requests can be made prior to the initialization of the database, so switching to database-stored configuration will increase request response time. This functionality should be used only when you have no other option. To enable database-stored setting, add define( 'W3TC_CONFIG_DATABASE', true ); to your wp-config.php and the plugin will immediately begin to use options table for configuration storage via wp-options table. Alternatively, W3TC_CONFIG_DATABASE_TABLE constant can be defined to specify a table you created specifically for this use case.

Note: If you customized your settings prior to switching to the database storage setting, you will lose your configuration settings. Be sure to export settings beforehand, then import afterward. You can then remove configuration file from your source control if it was there and delete it. Ideally, defining the W3TC_CONFIG_DATABASE constant prior plugin activation allows you to skip all of these steps.

How do I enable Database Cluster support?

In order to use Database Cluster you need use WordPress in network mode and enable Enterprise mode for W3 Total Cache.

After enabling Enterprise mode you will find a area inside Database Cache box on the General Settings page. Click 'Enable database cluster' to enable the functionality.

How do I configure Amazon SNS?

  • You need to visit SNS and sign in /create account.
  • Create a new topic.
  • Copy paste the Topic ARN into corresponding field on the General Settings page.
  • Enter the correct SNS region in the corresponding textfield on General Settings page.
  • Enter your API key and API secret. You find your API key and API secret under Security Credentials in your Amazon account.
  • Click subscribe.
  • Save settings
Clone this wiki locally