Skip to content
Home » How To Speed Up WordPress Website? | WordPress Optimization

How To Speed Up WordPress Website? | WordPress Optimization

WordPress Optimization Do you want to WordPress Optimization to load the web faster? So, do you know what you need to optimize to speed up the loading of your website? Read this article and embark on optimizing right away.

Optimize page load speed means to optimize website load faster (under 3s is best) to increase user experience. Naturally, then your website will be optimized for SEO, increase traffic and especially will optimize customer conversion on the web when you run ads.

Why should we optimize the website loading speed?

According to Google’s research, up to 53% of users leave the site on mobile devices if it takes more than 3 seconds to load the page. According to Skilled research, 79% of potential customers are less likely to buy again when visiting a slow loading website.

And one more thing to note, since July 2018, Google has launched an update in which page load speed will be a factor for mobile search rankings – see more information here.

OK, got it With some of the above evidence to you to see that increasing the speed of web loading also means ” increasing the speed of money flowing into your pocket ” there.

No more rambling. In the following article, I will focus on detailed instructions to optimize to speed up WordPress (mainly for WordPress, other source codes can apply some things).

Is your WordPress website loading slowly or fast?
Before optimizing the loading speed, you must know whether your web load is slow or fast! If it loads quickly, then there is no need to optimize, right?

However, are you confident that your web ” loads as fast as the wind “? This must be checked to know. Because maybe your access is fast but your customers access is very slow?

Usually, I use these three tools, Tool Pingdom, GTmetrix and Google PageSpeed ​​Insights.

These are also the tools that the webmaster community often uses to check web loading speed and rely on it to optimize. They are all free tools.

The usage is very simple, enter your web URL and click test. The tool will analyze the website and give load time, scores and components that slow down the web. From there, there will be suggestions for you to optimize the web.

Try to test your web load speed to see the results. Is it fast?

By the way, how fast is it? As mentioned above, page load speed must be less than 3s to be called good.

Again, web loading speed is under 3 seconds is good already. And do not try to take time to achieve the score 100/100 that Google PageSpeed ​​Insights launched. Because there are many people trying to ” force to achieve a score of 100/100 ” but in fact the web loads very slowly.

Try to make your web page load as little time as possible. Even a few milliseconds will work. There will be many differences with just those milliseconds. And the Google PageSpeed ​​Insights score of about 80 is fine.

At this point, if your web load takes more than 3 seconds, there are many things for you to do already. Let’s start optimizing slowly each of the following below.

Things to optimize to speed up WordPress load

Optimizing web loading speed to speed up WordPress to absolute level will require you to intervene deeply by techniques.

However, it will be difficult if you are a beginner to do web with WordPress.

But do not worry, if the intensive technical intervention can help optimize each millisecond, optimizing the most basic problems can help you optimize for a few seconds to load the web.

So, start optimizing from the basics first to get a slow loading website up to a faster and faster load.

Note: Before starting to perform the operations below, you should back up the entire website in case the mistaken operation causes errors and can restore the original state for the web. How to backup you can refer to the appropriate of the 2 ways below.

Method 1: Automatic WordPress web backup with a completely free plugin
Method 2: Install automatically backup the entire VPS on Google Drive
OK, got it Now we will go to optimize each element from basic to advanced to reduce every millisecond of web load offline.

1. Choose quality hosting

Hosting is the first factor that needs to be mentioned if you want your WordPress website to load quickly. You can use shared hosting or VPS.

The server greatly affects the web loading speed
Whether you choose shared hosting or VPS, you must first choose a reputable hosting provider. Then choose the hosting that has the right configuration and has the best server location with the majority of web visitors.

  1. Choose a reputable provider: Will help your hosting be guaranteed uptime (uptime) high, uninterrupted.
  2. And Choose hosting configuration: Depending on your web code as well as the amount of web traffic you need to choose the right hosting configuration to avoid being overloaded for hosting.
  3. Choose a server hosting location: This is very important because if you choose a server that is far from the user, the web load speed will be affected quite a lot. Suggestions for you should choose a domestic provider if the amount of traffic is mainly in Pakistan, otherwise, you should choose to buy foreign hosting.

2. Choose a theme that optimizes speed

Surely you have heard a lot of keywords such as fast loading theme, standard SEO theme or extremely light theme, … right?

These are the themes that the developers have optimized the structure for the SEO standard and are most compact for fast loading speed.

You can search Google to see there are many WordPress theme templates with all categories for you to choose from free to paid. However, if you have worked with different themes, you will learn from the fact that the more effects and functions the themes have, the slower the loading speed will be.

So, the experience here is to choose the theme with simple structure, standard SEO and especially to FAST LOAD.

So choose a theme provider that meets the criteria of fast, light and SEO standards?

Best personal blog, web news theme

If you buy a theme to make a personal blog or news website, choose themes from StudioPress (Genesis Framework), MythemeShop or the emerging name HappyThemes.

Theme to make the best sales web

For web sales, the currently selected theme number 1 is the FlatSome theme followed by the Porto theme. With advantages such as a beautiful interface, easy to customize, SEO standards and fast-loading, this is the best choice for you.

3. Minimize unnecessary plugins

Still, know that using WordPress, you will need to install the plugin to bring functionality to the web. However, the use of smart WordPress plugin will help the site from being more burdensome.

How to minimize the installation of heavy plugins for the web?

– Should use the famous plugin has more functions than just install a bunch of plugins each one function.

– Remove all plugins with the same use, keep only the lightest, best plugin.

– Directly ” delete ” unnecessary plugins.

– Minimize the use of plugins like inserting a Facebook comment box with code instead of using the Facebook comment plugin. Or install Google Analytics on the web through Google Tag Manager instead of using the Google Analytics plugin, …

– Delete one-time-only plugins like the WordPress Importer plugin after importing data into WordPress, the Better Search Replace plugin after use.

4. Optimize social sharing buttons

Social sharing buttons like Facebook, Twitter, … are really useful because it helps users interact like, share your posts on social networks. However, this is also a factor that greatly affects site speed.

Most social sharing buttons use JavaScript, which makes the loading speed of your website slow down. So, use the social sharing plugin simple, compact and especially use Asynchronous techniques to limit the slow down of the web.

5. Optimize images to speed up WordPress better

Writing standard SEO articles, it is indispensable for images, because images help the article to be lively and help readers have a more intuitive view of the article. But the image itself is the component that takes the most time to load the page in the site.

Optimizing images will help speed up WordPress up to 80% of page load speed. Therefore, please optimize the image to the maximum if possible. Please perform the optimization related to the image below right away.

Use appropriate image formats

The most popular image formats for the web today are JPEG and PNG. However, each format has its own advantages and disadvantages and you need to understand it to use it appropriately. Here I will briefly tell you to understand the following:

  • Using JPEG: When your photos have many details, many different colors.
  • Use PNG: When your photos have little detail, the colors aren’t too complicated.
    Typically, for the same image quality, PNG images will have a higher capacity than JPEG.

Use the optimal image size

I see many of you when uploading images on the web, you usually do not pay attention to the image size, so the screenshots or downloads on the web are about 1200px wide and the size you keep the same but upload it on the web.

You should remember that the larger the image size, the higher the image size will be while the web display on all devices has a certain size. So sometimes large images will be redundant.

The advice is to resize or crop the image to the appropriate size before posting on the web. You can use software such as Paint, Photoshop, … to resize the image.

In my experience, to choose the right image size for your site structure, do the following:

Access your website, press F12 to open the Inspect tool. Then click the arrow as shown below and select the display area of ​​your web content.

Check the width of the display of web content
As you can see in the image, the width of the content display is 702px. As such, you should set the image size to a maximum width of 700px to be best suited.

Compress images before uploading to the web

To optimize the image, it is certainly not impossible not to mention image compression. Along with an image size when you perform compression it can help reduce up to 60% of the size. That means the page loading speed will be many times faster and it also reduces the use of hosting memory.

There are many ways to compress images, you can use Photoshop to compress or compress online via tinypng.com or use image compression plugins for WordPress such as EWWW Image Optimizer, Compress JPEG & PNG images or ShortPixel Image Optimizer.

Depending on how you can choose one method, for me, I bought the copyright of the TinyPNG plugin for Photoshop to compress on my computer first and then upload it to the web. This will meet the criteria to restrict the use of plugins for WordPress.

6. Split long articles into multiple pages (if necessary)

Tutorials or case studies are often very long because we will provide useful knowledge in them. And often long posts will make it easier for SEO to top Google.

However, if your article is too long, many images that you do not break the page, then an entire load of article 1 will take a lot of time.

So, use the function to split long posts into multiple pages available in WordPress to segment articles.

The method is very simple, you use the new Gutenberg editor of WordPress, then insert the Page Break block in the position where you want to break the page. If you use an old text editor, switch to Text (edit HTML) and then insert the code <!–next page–>where you want the page break.

7. Divide the comment section into pages

Do your posts receive hundreds or thousands of comments? Congratulation! The article you create is valuable and has received a response from readers.

However, when there are many comments that load the page time similar to the article is too long, now you need to optimize the comments so as not to affect the ability to speed up WordPress.

What you need to do is go to the comments management section in WordPress, tick the ” Split feedback into multiple pages with … ” section to split comments into multiple pages.

8. Turn off Pingbacks and Trackbacks

This function is used to communicate between websites when there is a certain link in a news article. However, this function does not help anything but partly it affects the site speed.

Turn it off by going to the comments manager and unchecking the ” Allow links from other blogs (pingbacks and trackbacks) section on new posts “.

Disable Trackbacks and Pingbacks in WordPress

9. Caching – Create a cache for WordPress

To speed up WordPress, it is impossible not to use this caching speed. Using caching reduces the burden on the server by up to 70% and helps improve load speeds by up to 2 to 3 times.

With WordPress, creating a cache for the web is very easy with the support of plugins. And here are the best cache creation plugins.

  • WP Super Cache: Simple and effective free cache creation support. Suitable for websites that are using regular hosting with Apache.
  • W3 Total Cache: Supports free, professional and efficient cache creation. Suitable for web running on Nginx server (mainly running on VPS / Dedicated Server).
  • LiteSpeed ​​Cache: Plugin creates the free but very powerful cache. However, it only works when installed on the web running on hosting that supports LiteSpeed ​​Cache.
  • WP Rocket: This is the best-paid cache creation plugin currently. It helps to speed up WordPress web several times. Especially, it helps to green the score when testing the web with Google PageSpeed ​​Insights.
    See also: Instructions for installing and configuring the WP Rocket plugin

10. Use lazy loading technology Lazy Loading for images/videos

surely there will be at least 1 too many photos or videos. However, it is the images and videos that are responsible for the slow loading speed.

If you do not optimize images according to the instructions above, your web will load very slowly. But if you’ve already optimized the image, then you still need to use the Lazy Loading technique to help slow down the loading of images.

Lazy Loading technique you can simply understand that images will load when content is displayed on the browser screen. This means that the image will not load when you load the page; it will only load when you scroll the mouse to the location where it will be loaded.

To apply the Lazy Load technique to the WordPress website, you can use the Lazy Load plugin available on the WordPress plugin repository.

However, if you are installing the WP Rocket plugin then you will not need to install additional plugins. Because in the WP Rocket plugin has built-in this feature.

To turn on the Lazy Load feature in WP Rocket, go to  -> WP Rocket. Then select the Media tab you will see LazyLoad. Select all 3 items in there then click Save.

11. Compress CSS, JavaScript and Html files

For every website, CSS and Javascript are indispensable components. However, these same components make the web load slowly if you do not know how to optimize.

When writing CSS or Javascript, the writer usually aligns so that it is easy to see, insert in the comment line for easy editing. However, it is this that makes the CSS and Javascript files increase in capacity when it contains spaces, comments.

To minimize the size of these CSS and Javascript files we need to compress it. If done manually, you will have to open each file and delete each excess space. But with WordPress, you don’t have to bother doing that.

You can install specialized CSS, Javascript, and HTML compression plugins like Autoptimize or Fast Velocity Minify. If you are using the WP Rocket cache plugin, you can enable the compression function without installing another plugin.

Enable CSS, Javascript and HTML compression in WP Rocket by visiting the File Optimization tab and then ticking the following items.

Compress HTML by checking the Minify HTML item

Compress CSS by checking the items:

  • Minify CSS files
  • Combine CSS files
  • Optimize CSS delivery
    Note: If compressing the CSS causes an interface error you can find the cause and exclude the CSS file by adding the path of that CSS file to the Excluded CSS Files section.

JavaScript compression (JS)

To compress the JS file, you tick the items:

  • Minify JavaScript files
  • Combine JavaScript files
    Note: If compressing the JS file causes a problem with the web, you can also find and exclude the inline JS file or the external JS file in the Excluded Inline JavaScript or Excluded JavaScript Files boxes.

12. Remove Query String of static files

Query strings, or query strings, are all things that go after the “?” Or “&” signs in the URLs of static files like CSS and JS.

Typically these query strings will be useful to developers, and for users, these query strings will often slow down the web so we need to delete it.

There are many ways to delete Query strings. You can use the plugin or use code to remove it. Below I will show you both ways to remove the query string.

Remove the query string with the plugin

If you are installing the WP Rocket plugin, this is very simple. You access the installation item WP Rocket plugin then select the File Optimization tab.

Right in the first part, tick the box Remove query strings from static resources to enable query string elimination for static files.

If you do not have the WP Rocket plugin installed, you can use the WP Remove Query Strings From Static Resources plugin to remove query string. You just need to install the plugin and there is no need to set up anything.

Remove query strings with code

If you do not use the WP Rocket plugin then I recommend using the following code to remove the query string rather than the plugin.

You only need to insert the following code at the end of the file functions.phpin the theme you are using.

# Remove Query String in WordPress
function remove_cssjs_ver ( $ src ) {
if ( strpos ( $ src , ‘ ? ver = ‘ ))
$ src = remove_query_arg ( ‘ ver ‘ , $ src );
return $ src ;
}
add_filter ( ‘ style_loader_src ‘ , ‘ remove_cssjs_ver ‘ , 10 , 2 );
add_filter ( ‘ script_loader_src ‘ , ‘ remove_cssjs_ver ‘ , 10 , 2 );
view rawfunctions.php hosted with ❤ by GitHub

13. Enable Gzip compression for the web

Turning on Gzip compression for the web is to reduce the size of static files such as CSS, Javascript, and HTML, thereby minimizing the response time from the server.

If your website is installing cache creation plugins, you won’t need to do anything else. If you do not use any plugin cache then you can use code to enable Gzip compression.

To do this, please refer to the article on how to enable gzip compression and cache in the browser for more details on how to do it.

14. Database optimization

When using WordPress 1 for a while, the database will gradually become cumbersome with junk data. This junk data is created when you install and delete plugins, themes or drafts automatically saved, etc.

To speed up WordPress, in addition to optimizing the code, database optimization is essential to help the web query data faster.

You can optimize the database manually or use the plugin. If you install the WP Rocket plugin, you can also use it to optimize and clean the database (this plugin is ignored enough).

In addition, you can refer to the entire WordPress database optimization guide that you have had separate tutorial articles.

15. Restrict Post Revision (save draft)

Perhaps you also know, when writing articles in WordPress, the posts will automatically save the draft (Post Revision) after a certain time. This feature will make the database gradually become bigger and bigger if you do not clean it.

To help the database from getting worse by this feature, you can turn it off or limit it to speed up WordPress loading faster. You simply need to insert the following code into the file wp-config.php.

Limit Post Revision to each article

define( ‘WP_POST_REVISIONS’, 4 );

The above code is limited to only saving the last 4 revisions, you can change the number of post revisions by editing the 4 in the above code.

Turn off Post Revision feature

define(‘WP_POST_REVISIONS’, false );

16. Fix or delete broken links

The broken links here I’m not talking about the 404 links that I want to talk about are the file links, image URLs or broken links in JavaScript and CSS files. When your web contains broken links, then the browser will take time to try to download those links, so the web will have increased load time.

To avoid this problem, you must keep the link always working well. With images, you should upload them directly to your website so you have complete control over that image. Avoid pasting image links from another web page until the web is down or poor loading speed will drag your web to slow downloading.

You can use tools to check broken links online to find and fix or remove them from your website. I do not encourage you to install additional plugins on the web to check because it can make the web heavier. You on Google search keyword “check broken links online” will see many websites that support this.

17. Keep WordPress up to date

Regularly updating WordPress core updates or plugins, new themes are essential. Because updates will often fix, add features and optimize the system, improve performance.

As a webmaster, it is your responsibility to update to the new version for WordPress. This helps your website not being outdated, no longer slow and especially better WordPress security with patches.

Note: Updating WordPress, plugins and new themes is essential. However, you should not rush to see the new update is always up. Because many times, new updates that are not compatible with other components can cause errors.

The experience here is to learn carefully the changelog of the plugin, theme before updating. And always back up everything before updating.

Epilogue
The article is quite long with all the basics to optimize speed to speed up WordPress faster. Although there are many factors to speed up WordPress, here I just give you the things you have to do immediately if you want the WordPress website to load faster.

Leave a Reply

Your email address will not be published. Required fields are marked *