WordPress website speed improve / การปรับปรุงความเร็วของเว็บไซต์ WordPress

Alternative solutions:

  • Contact us for (paid) consulting services to solve WordPress speed related issues.

This article contains practical information and tips to make your WordPress website faster . In the first part I explain which parts are of influence, in the second part how you can make these parts faster.

Why

The influence of speed on the effectiveness of your website is often underestimated. Not only do visitors rather slow down on slower websites, and the conversion (the percentage of visitors who buy or do something on your site) is higher, search engines such as Google also give higher " SEO ranking " to faster websites, so you're better found.

About WordPress

WordPress is an extensive system and there are many factors that influence the speed of your website, so it is useful if you have an idea how WordPress works. Therefore, first a short explanation about the operation of WordPress. The components of your WordPress website can be conceptualized in 3 categories.

1. WordPress itself

WordPress is a " Content Management System ", with which you can easily edit and manage the content of your website (via the wp-admin section). All text, images and layout that you enter there is stored in a database , which you can not really use. However, if someone visits your site "at the front", WordPress combines all those pieces of information from the database and other sources into a readable whole; your website.

If you compare your WordPress website with a house, this means that for every visitor your house is completely rebuilt! That seems impractical and not very efficient, but fortunately computers are now so fast that (usually) they work well. The big advantage is that the websites can be personalized (tailored to individual visitors) and you can easily update your website. Just as with houses, not every wall needs to be more bricked, but they can be placed the same in their entirety each time, for websites we speak about "Caching" (see below).

2. Plugins

If you use WordPress you undoubtedly have 1 or more plugins in use. As I compared WordPress with a house, you can compare those plugins with the layout of your house. Some plugins are very small, comparable to an extra table in your house, while other plugins look more like a huge extension. A small plug-in can for example be a simple contact form on your contact page. A "rather heavy" plugin is for example the SEO plugin from Yoast.

3. Theme

If plugins are the extra tables and extra rooms, then themes (which determine how your website looks like) can be compared with the layer of paint on and in your house.

And that's how it all comes together

The computer power that your hosting provider puts at your disposal can then be seen as the construction workers who have to build your house. Using more workers means that your house is finished sooner, but of course it makes a difference whether those workers have to build a small terraced house (a new WordPress installation), or a huge castle (a WordPress installation with many and large plugins, complex themes, etc.). And because for every visitor the workers build a "new house", frequently visited websites become slower because the computer power is divided over more visitors.

In other words; the speed of your website is determined by the complexity of the website itself, and the computer power available at that moment (which in turn depends on the number of visitors on the same server).

The cheapest way of hosting is called shared hosting . With shared hosting the computer power ("the workmen") is shared between a large number of websites, so if "the construction workers" are busy with someone else's website, that will also affect the speed with which your website is built. However, that is the responsibility of your hosting provider, who must ensure that every website has enough capacity at all times. But if conversion is important, or you have many visitors, shared hosting is not usually the best choice. You can then better switch to faster hosting such as  Premium WordPress hosting , or a Cloud Server .

Make your site faster

          Measuring is knowing. The first thing you have to do is measure the current speed of your website. You can use  Pingdom FPT for this purpose *. Do that a few times throughout the day, for example in the morning and in the evening to get an idea whether your site is always as fast. A loading time under 4 seconds is acceptable for many websites, if it is slower than 6 seconds you should actually improve on that. If you have a web shop, you should aim for less than 3 seconds. If you have completed the tips below, measure the speed again to see if it has been improved.

* You can select a nearby location in Pingdom FPT under Settings such as Amsterdam, which makes a difference in the result, especially if you do not use CDN

Plugins

  • Step 1: The first action is to take a close look at all your plugins. Do you really need them all or are certain plugins actually not needed (anymore?)? Less distraction for visitors (of widgets etc.) can be positive on your conversion anyway, apart from the speed gain. Note, even inactive plugins have a (small) impact on the speed of your site, so remove them if you no longer use them.
  • Step 2: Use the P3 Profiler plugin to find out how much time each plugin uses. If a plugin really stands out, consider using an alternative that is faster, or simply not using that plugin anymore.

Especially functionality such as "Related posts" or performance trackers can be very delaying, and are often unnecessary.

Theme

  • Some themes are very complex or sometimes badly programmed, so they slow down your website enormously. The best way to find out is to activate the default theme (such as Twenty Fifteen). Consider another theme if it turns out that your current theme is slowing things down a lot. Often (but not always) paid themes are better programmed.

Caching and offloading

  • You can make (parts of) your website static (this is called caching), so that they do not have to be recreated for every visitor. Almost every frequently visited website makes use of this. For WordPress there are two very popular plugins that do this for you: W3 Total Cache and Supercache. In addition to caching, there are many other options in these plugins to make your site faster.
  • In addition to staticizing your website, you can also use a CDN (Content Delivery Network) to load parts of your website such as images from the fastest locations. WordPress Premium customers receive a CDN by default , but you can use any CDN, also on shared hosting.

Other techniques

  • Google PageSpeed provides good insight into which parts of your website can be improved.
  • You can optimize the images on your site so that they do not take up more space than necessary. You can do that manually with a photo editing program, but it's easier to use a plugin like WP Smush.it (free for images up to 1 MB).
  • With Browser Caching you ensure that content that does not change frequently, such as images on the computers of your visitors are stored. In this way, someone who visits your website does not have to retrieve each element every time. For this you can also use W3 Total Cache, or something more technical, to add the rules yourself to the .htaccess file of your website.
  • Visitors can leave standard comments (this is different from a contact form). If your site does not use that option, turn it off
  • Trackbacks off if you do not need (and have few sites that actually needed).
  • Your homepage is often the most important page. Make sure it is not too long, and work with "excerpts" instead of showing articles fully on your homepage.

สำหรับภาษาไทยดังนี้

ในบทความนี้เป็นการแนะนำเพื่อให้เว็บไซต์ WordPress ของท่านใช้งานได้เร็วขึ้น

เหตุผลของการสร้างเว็บไซต์ที่ดีและรวดเร็ว

เนื่องจากความเร็วของเว็บไซต์มีผลต่อการเข้าใช้งานของผู้เยี่ยมชมเว็บไซต์ การซื้อ ขาย หรือดำเนินการบางอย่างบนเว็บไซต์ที่มีโอกาสมากขึ้น รวมไปถึงเว็บไซต์ค้นหาข้อมูลอย่าง Google จะได้ลำดับ SEO ที่สูงขึ้น

WordPress

WordPress เป็นระบบที่มีหลายปัจจัยที่มีผลต่อความเร็วของเว็บไซต์ ซึ่งมีส่วนประกอบสำคัญ 3 อย่างได้แก่

1. WordPress

WordPress เป็น Content Management System ประเภทหนึ่งที่ง่ายต่อการแก้ไขและจัดการคอนเทนต์ในเว็บไซต์ของท่าน (ผ่านทาง wp-admin) ทั้งข้อความ รูปภาพ และเลเอาท์ทั้งหมดจะถูกเก็บอยู่ในฐานข้อมูล เมื่อมีผู้เข้าชมเว็บไซต์ WordPress จะเรียกข้อมูลจากทั้งฐานข้อมูล และแหล่งข้อมูลอื่นๆ เพื่อแสดงบนเว็บไซต์ของท่าน

หากท่านเปรียบเทียบ WordPress เป็นบ้าน ทุกครั้งที่มีผู้เยี่ยมชม บ้านของท่านจะถูกสร้างขึ้นมาใหม่ ซึ่งจะดูไม่มีประสิทธิภาพ แต่เนื่องจากคอมพิวเตอร์มีความสะดวกรวดเร็วในการทำงานมากขึ้น ทำให้สามารถปรับเปลี่ยนเว็บไซต์ส่วนบุคคล และอัพเดทเว็บไซต์ได้ง่าย เหมือนกับบ้านที่ไม่ต้องก่ออิฐสร้างกำแพงใหม่ แต่ทุกคนสามารถปรับเปลี่ยนอยู่ในบ้านหลังเดียวกันได้

2. ปลั๊กอิน

การทำงานของ WordPress จะเรียกใช้ปลั๊กอินมากกว่า 1 ปลั๊กอิน หากท่านเปรียบเทียบ WordPress เป็นบ้าน ปลั๊กอินก็คืออุปกรณ์เสริมที่ทำให้บ้านของท่านมีความสะดวกสบายมากขึ้นรวมถึงบางครั้งอาจจะทำให้ปลอดภัยมากขึ้น บางปลั๊กอินที่มีขนาดเล็กจะเทียบได้กับการออกแบบบ้านที่มีสื่งเฉพาะตัว

3. ธีม

หากปลั๊กอินเป็นเป็นโต๊ะหรือห้องส่วนที่เพิ่มเติม ธีมเปรียบเสมือนได้กับการทาสีและการตกแต่งให้สวยงามและมีความน่าสนใจในการเข้าชม

เมื่อทุกองค์ประกอบที่สมบูรณ์มารวมกัน

          หากเปรียบเทียบการสร้างเว็บไซต์เหมือนกับการสร้างบ้าน ยิ่งคอมพิวเตอร์มีประสิทธิภาพมากเท่าไหร่เว็บไซต์ของท่านก็จะมีความสมบูรณ์และรวดเร็วมากเท่านั้น และยิ่งมีตัวช่วยเสริมมากขึ้น เว็บไซต์ของท่านก็จะมีประสิทธิภาพการทำงานได้สะดวกยิ่งขึ้น ยกตัวอย่างเช่นการสร้างเว็บไซต์ผ่าน WordPress ที่ดีควรจะมีตัวเลือกเช่น ปลั๊กอิน รวมทั้งธีมเพื่อเป็นตัวเลือกหรือตัวช่วยในการพัฒนาเว็บไซต์ของท่าน และยังรวมถึงพื้นที่บนเซิร์ฟเวอร์ของผู้ให้บริการ หากมีผู้เข้าชมเว็บไซต์จำนวนมากจะไม่ทำให้เว็บไซต์ท่านช้าลง

          อีกนัยหนึ่ง ความเร็วเว็บไซต์ของท่านมีความซับซ้อนอยู่ในตัวของมันเอง และประสิทธิภาพของคอมพิวเตอร์สามารถช่วยได้ในระดับหนึ่ง ขึ้นอยู่กับว่าจำนวนการเข้าใช้งานเว็บไซต์ผ่านเซิร์ฟเวอร์ตัวเดียวกันหรือไม่ วิธีที่ประหยัดที่สุดของการใช้โฮส คือ แชร์โฮสติ้ง (Shared Hosting) เนื่องจากแชร์โฮสติ้งจะมีการใช้ทรัพยากรร่วมกัน หากเว็บไซต์นั้นมีการดึงประสิทธิภาพ รวมถึงพื้นที่ในเซิร์ฟเวอร์มากเกินไป จะทำให้เกิดผลกระทบกับเว็บไซต์อื่นๆ ที่อยู่ภายในคอมพิวเตอร์หรือบ้านหลังเดียวกัน ดังนั้นจึงเป็นหน้าที่ของผู้ให้บริการที่จะต้องทำให้มั่นใจว่าแต่ละเว็บไซต์มีพื้นที่ใช้งานเพียงพอตลอดเวลาการใช้งานแม้จะเป็นช่วงที่มีผู้เข้าชมมากหรือน้อย แต่หากท่านมีผู้เข้าชมเว็บไซต์มาก การใช้บริการแชร์โฮสติ้งมักไม่ใช้ตัวเลือกที่ดีสำหรับการใช้งาน ท่านสามารถเลือกใช้งานโฮสชนิดอื่นเช่น  Premium WordPress Hosting หรือ Cloud Server

การทำให้เว็บไซต์เร็วขึ้น

การทดสอบความเร็วของเว็บไซต์ ท่านสามารถใช้งาน  Pingdom FPT ในการความเร็วได้ในหลายๆ ช่วงเวลาในของวัน เช่น ทดลองทดสอบความเร็วในช่วงเช้า กลางวัน เย็น ท่านจะพบว่าช่วงเวลาใดที่เว็บไซต์ของท่านมีความเร็วปกติ หรือความเร็วน้อยกว่าปกติ เว็บไซต์ทั่วไปไม่ควรมีการโหลดเนื้อหาหรือรูปภาพในหน้าหลักเกิน 4 วินาที หากหน้าหลักของเว็บไซต์ทำการโหลดมากกว่า 6 วินาที แสดงว่าเว็บไซต์ของท่านจำเป็นต้องได้รับการปรับปรุงหรือแก้ไขให้ทำงานเร็วขึ้น และเมื่อท่านได้แก้ไขเว็บไซต์เรียบร้อยแล้วท่านสามารถทดสอบความเร็วหลังการแก้ไขอีกครั้งหนึ่งเพื่อดูการเปลี่ยนแปลง

ท่านสามารถเลือกตำแหน่งของการทดลอง Pingdom FPTภายใต้การตั้งค่า เช่น กรุงเทพหรือนิวยอร์ค ซึ่งแต่ละการตั้งค่า ท่านจะได้รับผลลัพท์ที่แตกต่างกันไปหากท่านไม่ได้ใช้งาน CDN

ปลั๊กอิน

ขั้นตอนแรกสำหรับการเลือกใช้งานปลั๊กอิน 

  • ท่านต้องการใช้งานปลั๊กอินทั้งหมดหรือแค่บางอย่างในเว็บไซต์ของท่าน
  • ยิ่ง widgets น้อย เว็บไซต์ของท่านจะยิ่งมีความเร็วมากขึ้น

ข้อควรจำปลั๊กอินที่ท่านทำการติดตั้งแต่ไม่ได้ใช้งาน ก็มีผลกระทบกับความเร็วของเว็บไซต์เช่นกัน ดังนั้น ท่านควรลบปลั๊กอินที่ไม่ได้ใช้งานออกจาก WordPress

ขั้นตอนต่อไป

  • ใช้งาน P3 Profilter plugin สำหรับการหาข้อมูลว่าปลั๊กอินแต่ละชนิดใช้เวลาในการเรียกใช้งานนานเท่าใด หากเป็นปลั๊กอินจำพวกใช้เวลาในการทำงานนานให้ทำการยกเลิกการติดตั้ง

ธีม

  • ธีมบางชนิดมีความซับซ้อนและอาจถูกสร้างด้วยการเขียนโปรแกรมที่ไม่สมบูรณ์ จึงทำให้เว็บไซต์ของท่านช้าลงอย่างเห็นได้ชัด วิธีที่ดีที่สุด คือ การเลือกใช้งานธีมทั่วไป เช่น Twenty Fifteen Theme ท่านสามารถลองเปรียบเทียบความเร็วของธีมแต่ละชนิดได้ โดยส่วนใหญ่แล้วธีมที่มีค่าใช้จ่ายจะมีประสิทธิภาพดีกว่าธีมที่เป็นของฟรี

Caching and offloading

  • ท่านสามารถสร้างเว็บไซต์บางส่วนของท่านให้เป็นรูปแบบ Website Static ได้ (วิธีนี้เรียกว่า Caching) มีปลั๊กอิน 2 ชนิดที่ได้รับความนิยมคือ W3 Total Cache และ Supercache และมีตัวเลือกอื่นๆ สำหรับปลั๊กอิน Cache เพื่อทำให้เว็บไซต์ของท่านเร็วขึ้น
  • ส่วนอีกวิธีหนึ่งสำหรับเว็บไซต์ staticizing ท่านสามารถใช้งาน CDN (Content Delivery Network) เพื่อทำการโหลดหน้าเว็บไซต์บางส่วนของท่าน เช่น รูปภาพจากแหล่งที่เร็วกว่า สำหรับลูกค้า Premium WordPress จะได้รับสิทธิในการใช้งาน CDN ฟรีไม่มีค่าใช้จ่ายเพิ่มเติม และท่านยังสามารถใช้งาน CDN สำหรับแชร์โฮสติ้งได้

เทคนิคอื่นๆ

  • Google PageSpeed ให้ท่านได้ทดสอบว่าเว็บไซต์ของท่านว่ามีส่วนไหนที่สามารถปรับปรุงเพื่อเพิ่มความเร็วได้มากขึ้น
  • ท่านสามารถปรับแต่งรูปภาพบนเว็บไซต์เพื่อให้ใช้งานพื้นที่ในเว็บไซต์น้อยลง ท่านสามารถทำได้ด้วยตนเองโดยใช้โปรแกรมปรับแต่งรูปภาพ และยังสามารถใช้ปลั๊กอินเช่น WP Smush.it (ฟรีสำหรับรูปภาพไม่เกิน 1MB)
  • ด้วยระบบ Browser Caching ไม่ควรเปลี่ยนเนื้อหาหรือรูปภาพในเว็บไซต์บ่อยจนเกินไป เนื่องจากเบราเซอร์ของผู้ที่เข้าชมเว็บไซต์สามารถเก็บ Caches ไว้เพื่อการเข้าชมในครั้งหน้าจะมีความรวดเร็วมากกว่าครั้งแรก หรือท่านสามารถใช้งานปลั๊กอิน W3 Total Cache หรือวิธีการอื่นที่ช่วยให้เว็บไซต์เร็วขึ้น เช่น การแก้ไขไฟล์ .htaccess file
  • หากเว็บไซต์ของท่านไม่ได้ใช้งานกล่องความคิดเห็น สามารถปิดการใช้งานได้
  • ปิดระบบ Trackbacks หากท่านไม่ต้องการใช้งาน มีเฉพาะบางเว็บไซต์เท่านั้นที่ใช้งานในส่วนนี้
  • หน้าหลัก (homepage) คือหน้าสำคัญที่สุด ควรแสดงเฉพาะข้อความที่สำคัญและน่าสนใจเท่านั้น
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.