Traditional Culture Encyclopedia - Photography and portraiture - How to effectively improve the speed of WordPress website

How to effectively improve the speed of WordPress website

1. Choose a good host

WordPress hosting service plays an important role in website performance. A good hosting service provider, such as BlueHost or Siteground, will take extra measures for WordPress to optimize the performance of your website.

ordinary websites can just use * * * to enjoy the host at the beginning, but if the content of the website is more, the use of larger themes consumes more memory or the traffic is more, then it will be more difficult for * * * to enjoy the host. During the period of high traffic, the speed of the site is very slow, and even it stops frequently.

If your website is slow to access now, see what host you are using and whether the existing configuration is enough.

if it is not enough, you need to upgrade the host. It is recommended that WP Engine manage WordPress host or VPS.

2. Use a lightweight theme/framework

The slow access speed of the website is probably caused by your WordPress theme not being optimized or containing too many functions.

Although many advanced themes are powerful and highly customized, they inevitably lead to too large theme packages and consume resources.

Themes like The7, installation packages of more than ten meters, and general virtual hosts are hard to run.

if you have to use some advanced themes, do you recommend using Divi? A lightweight optimized WordPress theme. Use some themes developed by famous big companies, and try to use less unknown themes.

3. Adjust and optimize the image

One of the most neglected aspects in website optimization is website image optimization. I have seen many people upload their pictures directly without processing more than ten meters. WordPress image optimization can have the greatest impact on page loading time.

Although using high-definition pictures can make our website look good, some good photos on the blog can really bring a lot of sharing and comments.

However, the disadvantage is that the unoptimized image is usually very large, several meters or even ten meters, which seriously slows down the access speed of the website. Large images will also take up a lot of HTTP requests. Generally, virtual hosts have traffic restrictions.

if there are many pictures on your website, this may mean slower page loading time. Because we are not a photography website, the content and loading speed of the website are more important than the beauty of the pictures.

the size of the picture has a great influence on the acceleration speed of the website. Many websites are not fully loaded because the picture is too big.

we can optimize and adjust the image size before uploading, and try not to exceed 1M, and 1-5kb is the most suitable.

we can optimize the picture in two ways.

the first manual scaling and cropping of images or compression

We can also use lossless or lossy image compression to make images smaller. Most people look for lossless compression to ensure that their images still look good on their websites, even if they are compressed.

there are some tools that cut the size of a picture like Photoshop, but you can still use a simpler method to do this.

First, choose the right theme. Most advanced themes are "Supporting Mobile Responsive Design". Their built-in image scalers or image scalers can create different uploaded thumbnails for different devices and screen sizes.

the second and recommended method is to automatically scale and compress images by using plug-ins.

I tested five different image optimization plug-ins and services. It shortened my page loading time a little. Especially with the mobile terminal.

The following are some I have tested, but the results are not very good

● EWWW Image Optimization Plugin (a free tool, but it will slow down the website every time a new blog post is published).

● WP Smush (There are free and advanced plug-in options now, but the free effect is not obvious, and the feeling of paying is not worth the price).

●Kraken.io (found no effect).

●ShortPixel (still no effect).

all of the above products have their advantages, but I need a tool that can compress images and create new images for scaling, cropping and resizing, which is a very key element.

finally, after extensive research, I finally found a plug-in that can meet all my needs.

this is a very powerful WordPress plug-in called Imagify, which was developed by WP Rocket. They should know the speed optimization of websites best.

connect to Imagify API service with imagify plug-in of WordPress for image scaling and optimization.

for most blogs, you can use Imagify for free, which allows you to use up to 25 MB of images of the service for free every month.

more importantly, it can optimize images very well. Imagify allows you to optimize the whole website in batches, and then optimize it individually when loading new images. It optimizes every image, even the image your theme creates for you.

4. Using cache plug-ins

WordPress cache plug-ins are obviously very useful, which can reduce the pressure on the server and make the website visit faster. Therefore, it is necessary to install cache plug-ins on WordPress websites

WP Super Cache? Developed by Donncha, the official developer of WordPress, it is the most efficient and flexible WordPress static cache plug-in at present. It directly generates HTML files for the whole webpage, so that Apache does not need to parse PHP scripts. By using this plug-in, the speed of your website will be significantly accelerated.

there is a similar plug-in W3 Total Cache, WP Fastest Cache? Also has the same function, just choose one to use.

there is also the most powerful cache plug-in Wp-Rocket? If you are concerned about speed, use this plug-in, it will never let you down, and the price is not expensive at $39 per year.

5. Use Content Delivery Network (CDN)

You have said that the audience of your website is customers from various foreign countries, so it is recommended to use the global accelerated service of CDN to ensure smooth access to all countries.

CDN improves the speed of your website by copying it and hosting it on servers around the world. For example, your website is hosted in the United States, but people from Japan want to visit it. If you don't use CDN, visitors from Japan will have to wait for American servers to load your website. However, if you use CDN, the server in Japan will load your website, which will make Japanese visitors load it faster. In this way, you can ensure that your site is loaded from a nearby server no matter where the visitors are.

the recommended CDN service is Max CDN, which is relatively cheap and effective, and the operation interface is very simple to use and can be set up in just a few minutes.

6. Optimize the homepage to load quickly

Although it sounds like one thing, there are many things to be done to ensure that your homepage loads quickly, which may be the most important part of your website, because people will visit the homepage of the website most often.

include the following things:

display excerpts instead of complete posts

reduce the number of posts on the page (control to display between 5 and 7)

delete unnecessary social sharing widgets from the home page (only include them in posts)

delete plug-ins and gadgets that are not needed or used frequently

Generally speaking, the home page of the website should not be too complicated, and people in China like it.

7. Optimize the WordPress database

Because the pages of WordPress website are all dynamic pages, the database is frequently read, and whether the database is optimized or not has a great influence on the access speed of the website, so we need to clean and optimize the WordPress database frequently, which is too troublesome manually, and most people will not.

WP-Optimize? Can automatically clean up the optimized database, this plug-in allows you to do a simple task: optimize the database (spam, revised version, draft, table, etc.) to reduce overhead.

I would also recommend the WP-DB Manager plug-in, which can schedule the date of database optimization.

8. merge compression code

Autoptimize? This plug-in can automatically merge CSS and JS, and compress them, which is very convenient. It can also compress HTML and some themes will have a large number of inline CSS. When merging CSS is turned on, these inline CSS will be automatically added to the file. Support CDN, you can choose to remove Google fonts. Using this plug-in needs to test whether the theme is compatible, and some theme compression codes may have problems.

9. using GZip page compression

GZIP coding on the protocol is a technology to improve application performance. High-traffic sites often use GZIP compression technology to make users feel faster. This generally refers to a function installed in the WWW server. When someone visits the website in this server, this function in the server compresses the web page content and transmits it to the visiting computer browser for display. Generally, the plain text content can be compressed to 4% of the original size. This transmission is faster, and the effect is that it will be displayed quickly after you click on the URL. Of course, this will also increase the load on the server. This function module is installed in general servers.

reducing the file size has two obvious advantages, one is to reduce the storage space, and the other is to reduce the transmission time when transmitting files through the network. Gzip is a command that is often used in Linux system to compress and decompress files, which is convenient and easy to use.

can we use this tool to check whether our website is enabled with GZIP? Check GZIP Compression

many plug-ins support GZIP compression? Check and Enable GZIP compression? ,WP Fastest Cache? .

1. Adjusting Gravatar images

Gravatar avatars need to use third-party services, which will also slow down the speed of our website. If you don't suggest that there is no avatar or don't need to use it,

you can find it in the discussion tab of WordPress dashboard and set it as a blank image instead of the default image, which will help your website speed.

if necessary, you can use the wp-user-avatars plug-in to set the avatar as local.

11. add LazyLoad to your image

lazy loading of images means delayed loading of images, which simply means loading only the images that can be seen on the page, thus shortening the waiting time of the page, and then loading the corresponding images when visitors need to see other images.

this can not only speed up page loading, but also save bandwidth by loading less data for users who don't scroll on the page.

The recommended plug-in is that Lazy Load is turned on by default after it is installed. If you need special settings, you can carefully study each setting item.

12. Control the number of stored revised versions

The so-called article revision means that every time you modify an article, it will automatically help you save the version of the article before the modification. The technical term is version control, which ensures that the previous content can be restored in the case of incorrect modification. This function is not of great significance to a small blog like ours, and it will produce a lot of useless data in the database, making your database more and more bloated.

the first method is to clean up the revised version regularly.

The function of p>WP Cleaner plug-in is very simple, which is to quickly delete the automatically saved redundant revised version and draft of articles, saving space and improving speed. The interface is also very simple, and it can be used after direct installation. The WP Cleaner plug-in has a protection mechanism, and no matter how it is operated, it will not affect the published articles.

the second method is to modify the wp-config.php file in the root directory of WP installation

// without saving any version (except the automatically saved version)

define ('WP _ post _ revisions',? false);

// save all revisions

define ('WP _ post _ revisions',? true);

// save n revised versions

define ('WP _ post _ revisions',? 3);

the number of saved revisions is set to 2 or 3, so some saved errors and deletions can be withdrawn, but not too many.

13. turn off pingbacks and trackbacks

by default, WordPress is equipped with pingbacks and trackbacks.

every time another blog mentions you, it will inform your website, thus updating the data on that post. Turning off this feature will not destroy the backlinks of your website, so you can disable it.

14.WordPress themes and plug-ins are updated to the latest version

WordPress, WordPress themes and plug-ins are updated very frequently, and every update will add some functions, optimize performance and fix some bugs, so updating these to the latest version can also ensure the safety of the website.

15. Use CloudFlare

This is similar to the part above about using CDN, but I like CloudFlare very much, because I discussed it in my best post on network analysis, and I have decided to list it separately here.

Frankly speaking, CloudFlare and W3 Total Cache plug-in discussed above are a very effective combination (they are integrated with each other), which will greatly improve the speed of your website, but not only improve the security.

both are free!