Newspaper template is used to make some photo websites, art websites, and company websites, which are very easy to use. The final effect is very artistic, giving people a sense of high-end atmosphere.However, the good looking effect brings about the problem of website speed. All websites using the newspaper template, the7 template, and avada template will open slowly.Today, Weieisi Blog helped speed up the group friend @ Jun website. Some problems were encountered and solved during this process. It was recorded in accordance with the old Wei's consistent habit of sharing, and some knowledge points were summarized and posted after the review. If you have the same problems, you can refer to them.
Before the operation, it takes about 13 seconds for the front page to fully open a page, and it takes about 5 seconds for the back page to open. He used a highly configured cloud server. This result does not match the configuration, and visitors reported that the opening was too slow.
1、 Site Acceleration Settings
First, Lao Wei asked for the password of the pagoda panel account and the password of the Wordpress background account, and went up to have a look.There are a lot of problems. Let's explain them one by one.
1. More than 5/6 WordPress plug-ins are not enabled.Some students think that it's OK if you don't enable it. In fact, even if you don't enable it, plug-ins will occupy system resources and slow down the website.After discussing with the webmaster, the useless plug-ins were uninstalled.
2. Cache acceleration is not enabled in the pagoda panel.After Lao Wei added cache acceleration, the opening speed of the front and back ends of the website has significantly improved.The opening speed of the front page has been improved to a certain extent;Backstage pages, editing articles and other pages are basically opened in seconds.
3. Database optimization and system environment optimization.Optimize the database and system environment by setting parameters to achieve the effect of speed increase.
4. Enable the js css html compression and merge plug-in to slim down the HTML, JS, and CSS files on the home page, which can improve the opening speed of the home page.
5. Use Gtmetrix to evaluate where the website has shortcomings, and continue to improve.
His website is a large image display website. The image size is 1600 * 900, 1900 * 600 and similar large images. After compression, an image will be more than 100KB. More than 10 such images on a page can't keep up with the reading and writing speed even though the server configuration is high.Therefore, we need to use cdn to accelerate and store oss objects, so as to achieve dynamic and static separation and reduce the pressure on the server.
1. Because Alibaba Cloud servers are used, Alibaba Cloud CDNs are used.This must be used. The more visitors, the faster the opening speed.
2. Alibaba Cloud OSS object storage is also enabled.The compressed image folder is 2.5GB in size, with nearly 90000 image files.It's easier to upload with OSS browser, because it's expected that the upload time will be too long, so Old Wei will open the computer to upload automatically and go to bed.
Websites of this type of template are generally used for enterprise websites and display websites. The goal is to look good. The initial configuration requires a 2-core 4G memory model. If it is too low, it will be slow to open.
1. Tencent ECS
Tencent ECS prices are generally lower than Alibaba Cloud.The reason for the price gap is the competition for market share. The second place must strive for a certain advantage in price to firmly hold the first place. When there is a chance, try again.
1. The attached disk was not added to the startup item, so it was added easily.Because his website has so much content, the default disk is not enough for daily backup, so he bought an additional 100G disk.The website and backup are all on this extra data disk.Here, Lao Wei will write a detailed article about the solution process later.
2. He pointed the main domain name and the www domain name to the IP address, and did not make 301 redirection.Old Wei conveniently added CDN acceleration and redirected the main domain name to the www domain name as 301.In this way, the domain name is unified, and the website weight can also be unified.
3. The pagoda panel has been upgraded to the latest stable version by the way, so you can get more available functions and tools.
The above is the whole process of the website acceleration recorded and shared by Lao Wei. It took several hours (mainly the time for downloading and uploading compressed image packages), and also solved several additional problems.The opening time of the website's front desk has increased from more than 13 seconds to 5 seconds now. If the home page webcast can be removed, it will be faster;The background is now on for seconds.During this operation, Lao Wei also reviewed and learned some knowledge points and detailed experience. In order to use it in the future, he recorded such a journal and shared it with students in need.
Article name: A Record of the Process of Accelerating Newspaper Template Website Article link:https://www.vpsss.net/15810.html Copyright notice: The resources of this website are only for personal learning and exchange, and are not allowed to be reproduced and used for commercial purposes, otherwise, legal issues will be borne by yourself. The copyright of the pictures belongs to their respective creators, and the picture watermark is for the purpose of preventing unscrupulous people from stealing the fruits of labor.