WordPress Faster!
#bainternetsites
en.bainternet.info
admin@bainternet.info
Who Am I???
* A.K.A.WP.W - Also Known As In WordPress World
WordPress Faster!
Wait, What?
Why should You care?
So How to make your WordPress Faster?
WordPress Optimaized Host.
Theme.
Plugins.
Cache.
CDN.
Optimize and lazy load Images.
Optimize Database.
Some Coding Best Practice.
So How to make your WordPress Faster?
WordPress Optimaized Host - Propbably the most common issues with Slow WordPress sites is poor Hosting. Oversold shared servers can cause long delays. These “All purpose” shared servers are not optimal for WordPress based sites.
If (you can and know how){
Use a deticated server or at least a VPS for any medium to high�traffic sites.
}ElseIf(you can){
Use a WordPress Optimized or even managed hosting.
}Else{
Well, you can still work with shared hosting and get some good� results, If you follow the rest of slides.
}
So How to make your WordPress Faster?
WordPress Optimaized Host.
Theme.
Plugins.
Cache.
CDN.
Optimize and lazy load Images.
Optimize Database.
Some Coding Best Practice.
So How to make your WordPress Faster?
Themes - Badly coded themes can and will slow you site down.
Make sure your theme is not overloaded and hold only or mostly just the features you need from it.
Bottom line: make sure your theme is NOT the cause for your slow site.
So How to make your WordPress Faster?
WordPress Optimaized Host.
Theme.
Plugins.
Cache.
CDN.
Optimize and lazy load Images.
Optimize Database.
Some Coding Best Practice.
So How to make your WordPress Faster?
Plugins - Just like themes plugins can slow your WordPress Site.
First of a very common “slow WordPress issue” is caused by the use of ”Too Many” plugins.
Another major issue is badly developed plugins which you can hunt down using plugin performance profiler.
Bottom line: Use only what you need, make sure its in the latest version (for security as well) and remove the rest.
So How to make your WordPress Faster?
WordPress Optimaized Host.
Theme.
Plugins.
Cache.
CDN.
Optimize and lazy load Images.
Optimize Database.
Some Coding Best Practice.
So How to make your WordPress Faster?
Cache - Not using a cache plugin is the number one reason for slow WordPress Sites, But fear not, Its the easest one to solve: �
Install a Cache plugin!
Beacuse:
Bottom line:
Install a Cache plugin!
So How to make your WordPress Faster?
WordPress Optimaized Host.
Theme.
Plugins.
Cache.
CDN.
Optimize and lazy load Images.
Optimize Database.
Some Coding Best Practice.
So How to make your WordPress Faster?
CDN- Basically a CDN (Content Delevery Network) takes all of your sites static files (CSS, JavaScript, Images etc..) and serves them to your users from an optimized server located closest to them as possible.�
Beacuse:
Bottom line: Use a CDN!
So How to make your WordPress Faster?
WordPress Optimaized Host.
Theme.
Plugins.
Cache.
CDN.
Optimize and lazy load Images.
Optimize Database.
Some Coding Best Practice.
So How to make your WordPress Faster?
Optimize Images - There are a few tools (and plugins) for optimizing Images by reducing the size of the image file, while not damaging the Quality.
Lazy Loading Images - means you only load the images that are visible in the browsers view and when the users scroll down, then the rest of the page images begin to load, just before they come into view.
Beacuse:
Bottom line: Do IT!
So How to make your WordPress Faster?
WordPress Optimaized Host.
Theme.
Plugins.
Cache.
CDN.
Optimize and lazy load Images.
Optimize Database.
Some Coding Best Practice.
So how to make your WordPress Faster?
Optimize Database - One of the best features of WordPress as a CMS is the fact that it often autosaves everything, But this has a major drawback which is the fact that the database gets filled with post revisions, trackbacks, pingbacks, spam comments, trashed items and other stuff you really don’t need.
Bottom line: Use a plugin that will take care of that for you.
So How to make your WordPress Faster?
WordPress Optimaized Host.
Theme.
Plugins.
Cache.
CDN.
Optimize and lazy load Images.
Optimize Database.
Some Coding Best Practice.
So How to make your WordPress Faster?
Some Coding Best Practice - Few tips and tricks I’ve picked up.
Efficient Database Queries :
So How to make your WordPress Faster?
Some Coding Best Practice.�
Efficient AJAX Requests: WordPress Provides an API to setup an AJAX endpoint, on the ‘admin-ajax.php’ url:
add_action(‘wp_ajax_my_action_name’,’my_callback_function’);
�This is nice and easy to use but it also means no caching will be done on queries within my_callback_function() .
So How to make your WordPress Faster?
Some Coding Best Practice.�
To get around this issue you can use the Rewrite Rules API to hook your front-facing endpoint:
// Register a rewrite endpoint for the API.
add_action( 'init', 'add_api_endpoints_suffix' );
function add_api_endpoints_suffix() {
add_rewrite_tag( '%api_action_name%', '([0-9]+)' );
add_rewrite_rule( 'api/actions/([0-9]+)/?', 'index.php?api_action_name=$matches[1]', 'top' );
}
//Handle API endpoint.
add_action( 'template_redirect', 'handle_api_endpoint' );
function handle_api_endpoint() {
global $wp_query;
$action = $wp_query->get( 'api_action_name' );
if ( ! empty( $action ) ) {
$response = array();
// Do stuff with $action
wp_send_json( $response );
}
}
So How to make your WordPress Faster?
WordPress Optimaized Host.
Theme.
Plugins.
Cache.
CDN.
Optimize and lazy load Images.
Optimize Database.
Some Coding Best Practice.
So How to make your WordPress Faster?
Links:
https://wordpress.org/plugins/p3-profiler/ - plugin profiler.
https://wordpress.org/plugins/w3-total-cache/ - cache
https://wordpress.org/plugins/wp-super-cache/ - cache
https://wordpress.org/plugins/gator-cache/ - cache works best on ecommerce sites.
http://cloudflare.com - CDN.
http://www.incapsula.com/ - CDN
https://wordpress.org/plugins/jetpack/ - CDN Photon.
https://wordpress.org/plugins/wp-smushit/ - images optimize.
https://wordpress.org/plugins/ewww-image-optimizer/ - images optimize.
https://wordpress.org/plugins/simple-lyteload/ - image lazy load (Its my plugin so you know its good).
https://wordpress.org/plugins/jquery-image-lazy-loading/ - image lazy load.
https://wordpress.org/plugins/wp-dbmanager/ - database.
https://wordpress.org/plugins/wp-optimize/ - database.
https://wordpress.org/plugins/bwp-minify/ - css and js minify.
https://wordpress.org/plugins/autoptimize/ - css and js minify.
So How to make your WordPress Faster?
Questions?