WordPress access slow solution

First, disable Google resources
WordPress many themes using Google’s services, and now Google is a large-scale shielding, a serious impact on the site’s visit speed, so banned! There are two ways to do this, one using plugins: Disable Google Fonts (or other Google Fonts plugins); another way is to add code directly in functions.php:
/ **
* remove google fonts
* by: www.jiawin.com
* /
function remove_open_sans () {
wp_deregister_style (‘open-sans’);
wp_register_style (‘open-sans’, false);
wp_enqueue_style (‘open-sans’, ”);
}
add_action (‘init’, ‘remove_open_sans’);

Second, modify the Gravater head to the wall
2014 Gravatar server wall, leading to the head are not shown, causing the site speed was slowed down. You can use the following code to solve the problem by the wall, of course, you can also use the Gravatar header cache approach to speed up.
/ **
* en.gravatar.com
* by: www.jiawin.com
* /
function quickly_gravatar ($ avatar) {
$ avatar = str_replace (‘? s =’, ‘.png? s =’, $ avatar);
$ avatar = preg_replace (“/ ([0-9]).. gravatar / i”, “en.gravatar”, $ avatar);
return $ avatar;
}
add_filter (‘get_avatar’, ‘quickly_gravatar’);

Third, delete the extra plugin
One of the strengths of wordpress is that it’s easy to scale, and there are a lot of great plug-ins that can meet all your needs, but for that reason, most of us have installed a lot of plug-ins, which affect the site’s Access speed. So here, it is recommended that you ban the extra plug-ins, only for their own plug-in is the best. So how do you start deleting the extra plugin?
1, audit each plug-in to see if it is necessary, if not please delete
2, check the plug-in version, keep the latest version of the plug-in, if the plug-in update time is a few years ago, please delete it
3, plug-ins as far as possible in the wp official download, to avoid the impact of bad plug-ins

Fourth, optimize the picture resources
Each site will have picture resources, the picture is often loaded into a website inside the file one of the largest resources, so we must manage the picture. Picture format suggested that you use the commonly used format jpg, png and gift, save the picture, try to reduce the size of the compression, but can not affect the use. Can be optimized
1, use the height and width attributes, make up the alt attribute (for seo friendly)
2, the use of tools to optimize the picture
3, the use of reliable image storage services

Five, the subject of the code efficiency
Wordpress theme can be said to be all-inclusive online, there are free, there are paid, but also have their own production, a theme determines a site shell containers, if the container is not good, then we can not even good things. So we should be careful choice, not only need to have a good interface, but also requires a reliable, excellent code of the theme.
In some time ago, re-customized a new theme, which optimized the efficiency of the implementation of php code, the effect is still very good, compared to a blog theme, the size of the first page reduced by half, sql query also reduced by half, the pressure on the server Greatly reduced. Here mention the theme code efficiency, in fact, PHP code level optimization, you can start from the following aspects:
1, optimize the efficiency of PHP implementation
2, to reduce the number of sql inquiries
3, delete some of the functions to static
4, set the php cache

Six, the host server
This is an optimization of the server, for example, can be lightweight, high-performance Nginx, load balancing, etc., the specific program is not described in detail. Here to suggest that the website, the server must be good, spend money can buy you a lot of time, energy.