Get started with Quant and WordPress
WordPress is the most popular CMS on the planet. Quant offers a one-click solution for integration.
Setup
- Download the Plugin from WordPress, or install from the admin UI.
- Visit the Settings > QuantCDN admin page, and click the “Settings” tab
- Ensure “Enable QuantCDN integration” is enabled
- Set your webserver URL to the local webserver loopback address (generally http://localhost), and provide your website domain as the hostname (e.g
www.example.com
) - Under the API section enter your account, project, and token details. These can all be found from the Quant Dashboard
- You should see a “Successfully made a connection to Quant” message at to the top of the page upon saving settings. If not, check the values under the API section and try again.
- Navigate to the “Seed Settings” tab and tick the “theme assets” box. Click “Save Settings” and you’re ready to go!
Wordpress.com hosting
Quant works just fine with sites hosted on Wordpress.com. Simply ensure the Webserver URL configuration points to the wordpress.com address, for example https://yoursitename.wordpress.com
.
Contact Form 7 support
Contact Form 7 posts values via AJAX by default. The response from Quant is not as CF7 expects, so an error is received.
To resolve simply disable the submission via JavaScript in WordPress by adding the following to your wp-config.php
file:
Push your form content from WordPress to Quant after making this change.
Elementor support
Elementor is a popular drag and drop layout and page manager for WordPress. Elementor has been tested thoroughly and works well with Quant. Make the following configuration change for best results:
- Navigate to the advanced Elementor settings page on your WordPress installation (Elementor > Settings > Advanced)
- Change the “CSS Print Method” dropdown to “Internal Embedding”
Divi Builder support
If using the Divi Builder plugin you should disable “Minify And Combine JavaScript Files” and “Minify And Combine CSS Files”.
These options can lead to absolute references in CSS files which break when serving content via Quant.
Redirects support
The popular Redirection plugin provides a mechanism for managing redirects in Wordpress. If this plugin is enabled you will see a “Redirects” batch.
Only standard URL redirects are supported (e.g no regex or other complex redirects).
CSS/JS Aggregation plugins
You may have issues with optimization modules depending on your configuration. If your site looks broken after the seed please try again with modules such a Page Optimize and Autoptmize disabled.
Preparing the initial seed
Seeding or Hydrating is the act of initial population of Quant. This will take all content, media assets, redirects, etc and push into Quant as a one-time action.
Once the initial seed is completed all further content change will be tracked and pushed to Quant automatically.
- Visit the “Batches” section of the admin area
- Here you will find all detected content that needs to be pushed
- Click each batch, followed by “Start”. The content will begin pushing to Quant, you should it appear immediately in your Quant dashboard
Using WP-CLI to seed your site
WP-CLI is a command line tool to interface with Wordpress. It is the recommended way of initially seeding your Wordpress site in Quant, and provides vast performance improvements over using the UI.
This is largely due to the ability to run the seed process with concurrency, which can immediately give a 10x performance boost (or greater) when compared to using the UI.
- Use wp quant info to view queue status
- Use wp quant reset_queue
<queue_name>
to reset a queue - Use wp quant process_queue
<queue_name|all> --threads=10
to process one queue (or all) with concurrent threads
Setting up Cron
Quant also supports pushing content when cron is triggered. This allows for a flexible model where certain aspects of the site are pushed when a cron run occurs (e.g once per hour/day).
This is useful for content such as feeds, or dynamic pages that may change relatively frequently but are not automatically pushed with the Quant plugin.
FAQ
How can I validate my configuration?
The Quant Plugin will let you know if there are any issues with your configuration.
If there are issues with your account details (e.g you have provided an invalid API account, project or token) you will see the following message:
Unable to connect to the Quant API, please check your configuration values and try again.
If there are issues with your local webserver details (e.g there are issues with the Webserver URL and/or Hostname values provided) you will see the following message:
Unable to connect to local webserver. Please check the configuration values for webserver and host and try again.
When all configuration is valid you will simply see a success message: “Successfully made a connection to Quant.”
When would I need to trigger a re-seed?
If you have made sweeping, site-wide change then a re-seed may be required. This could be in the following situations:
- Global look and feel changes (e.g Theme)
- Global IA change (e.g links in navigation)
Go-live setup
Ready to start serving traffic via Quant? Great! Follow the standard go-live process to change DNS records.