After your WordPress website has been running for a while, as the number of posts and plugins increases, the database also becomes larger, and you may feel the website speed slowing down. So how can you make WordPress faster? Naiba here shares methods to increase WordPress performance and speed.
What factors most easily slow down WordPress speed?
1. One of the most significant factors affecting WordPress speed is the quality of the server.That's right, no optimization can compare to hardware-level optimization. A high-performance server is the most influential factor on website speed. Naibabiji previously used a
Tencent Cloudserver with 1 core, 2GB RAM, 1Mbps configuration. Later, during a promotion, I switched to a Tencent Cloud server with 2 cores, 4GB RAM, 5Mbps configuration, and the website speed significantly improved. If your server configuration is not high, upgrading the configuration when conditions allow is the quickest and most effective method to improve website speed.
2. Not enabling caching for the website.WordPress itself is a dynamic website program. If you don't install caching, all user visits will load dynamically, causing increased server resource usage. After installing a caching plugin, user visits to your website data will directly read cached static files, which is several times faster than accessing dynamic files directly.
3. Loading too many images.Some friends who have just learned to build websites have no concept of how to upload images to websites. It's common to see beginners' websites uploading original images from cameras or phones that are several megabytes in size. Such images directly affect website speed. Especially for websites with relatively small bandwidth, a large number of large images can saturate your website's bandwidth, making it very slow for others to open.
Specific methods to optimize WordPress performance and speed
1. Upgrade server hardware when conditions allowAt the time of this article's publication,
WordPress's recommended hardware configurationis PHP 7.3+, database MySQL 5.6+ or MariaDB 10.1+, and the basic memory requirement for these two database versions is 1GB or more, so it's better to choose a server configuration with 1GB or more of RAM.
2. Install a caching pluginCaching is divided into page caching and database caching. For page caching, it is recommended for beginners to directly install
WP Rocket, which has the most obvious effect, but it is a paid plugin. For free options, you can use
WP Super Cache, etc. For database caching, Memcached or Redis are commonly used, but this type of caching requires a VPS or managed shared hosting to enable; ordinary shared hosting does not support it. Additionally, you can enable
nginx caching。
3. Use a lightweight theme with simple codeA high-quality theme typically has relatively high code quality, while some purchased premium foreign themes often have more complex code and come with many accompanying plugins. If ordinary users do not know how to optimize them, the site may become slower. Therefore, the simplest method is to use a lightweight theme. This site currently uses
Astra Pro Theme。
4. Remove slow-response pluginsIt is not necessarily true that installing more plugins will definitely affect website speed. However, if your server configuration is low, too many plugins can indeed have some impact. When the server configuration is sufficiently high, an excessive number of plugins themselves will not significantly affect website speed, but the quality of the plugins and some API calls from the plugins can impact website speed, which requires specific investigation. The simplest way is to deactivate plugins one by one and then determine which plugin, when enabled, slows down the website.
5. Use CDN accelerationCDN can indeed speed up a website, but if you are using a foreign server, you cannot use domestic CDN services, so the improvement may not be obvious. For domestic users, you can choose Tencent Cloud CDN, Alibaba Cloud CDN, as well as Qiniu and Upyun's CDN or object storage. Relatively speaking, Qiniu and Upyun's object storage is simpler; just install a plugin. Related tutorial:
Using Upyun to Accelerate WordPress Websites_New Plugin Tutorial 6. Reduce image sizes on the websiteSome novice users upload original images directly when posting articles, with each image possibly being several megabytes in size, causing the website to lag. We can reduce image resolution, compress image size, and then upload them.
7. Paginate commentsIf there are many comments on your website, it is best to paginate them. If necessary, you can
disable the comment avatar feature。
8. Use post excerpts for the homepage and archive pagesBy default, WordPress themes output the full content of posts on the homepage and archive pages, so your website page loads the complete content of several posts at once, including images and other resources, which can cause lag. Using excerpts avoids this issue. If you don't know how to do it, simply use a plugin:
Method to Display a „Read More“ Button for Posts on the WordPress Homepage 9. Do not upload video and audio files directly to WordPressUnless there is a specific reason, it is not recommended to directly upload videos and audio to the website backend. Although they do not autoplay by default, when someone plays them, they will consume your website's bandwidth, and when the bandwidth is full, the site will lag.
10. Paginate long articlesIf an article is too long, you can paginate it for display.
11. Reduce external resource requestsFor example, if you reference images from other websites and those sites are slower than yours, it will undoubtedly slow down your website's loading speed.
12. Reduce database callsEnabling data caching will result in a noticeable improvement.
13. Limit the post revision featureFor methods, refer to:
What are Windows revisions? How to disable autosave 14. Regularly optimize the databaseNaiba usually uses plugins to help:
7 WordPress Database Plugins for _Cleaning_Optimizing_Resetting_Repairing_Searching 15. Use lazy loading for imagesAlso known as lazy loading, you can use
a3 Lazy Loadfor settings (WP Rocket also supports it), and news suggests WordPress intends to make this feature standard.
16. Use the latest version of PHPUsually, newer versions of PHP improve performance, but consider your actual situation to avoid incompatibility between your Theme or Plugin and the latest PHP.
Comments are closed
The comment function for this article is closed. If you have any questions, please feel free to contact us through other channels.