Me yasa Gidan yanar gizonku na WordPress yake Slow? Hanyoyi masu Sauƙi don Saurin Shafukan WP ɗin ku

Mataki na ashirin da ya rubuta ta: Jerry Low
  • WordPress
  • An sabunta: Nov 12, 2020

WordPress shine mafi shahararren Tsarin Gudanar da Abun Cikin (CMS) zuwa yanzu kuma iko fiye da 38% na duk rukunin yanar gizo a duniya a yau. Ana ƙimanta shi saboda fa'idar sa ta barin masu gidan yanar gizo suyi saurin gina yanar gizo masu inganci da aiki.

Koyaya, WordPress yana buƙatar fahimta domin yayi aiki mafi kyau. Idan kuna gudana a shafin yanar gizon WordPress kuma kuna jin cewa aikin ya kasance ƙasa, zaku iya haɓaka haɓaka ta hanyar yin ƙananan ƙananan tweaks.

gudun yana da mahimmanci
Saurin gidan yanar gizonku yana tasiri ƙimar juyawa ƙwarai. Nazarin ya nuna a koyaushe saurin shafin sauri zai haifar da mafi kyawun juyawa. A 20% sauke a cikin sauyawa yana da kwarewa ga kowane dakika na bata lokaci a lokacin lodin shafin wayar. Kuma, a cewar Ka yi tunanin tare da Google, alamun aiki don saurin shigar da shafin shine sakan 0-1.

1. Rashin Caching Daidai

Kashewa gaba ɗaya shine lokacin da aikace-aikace ke adana bayanai a ƙwaƙwalwa don aiki da sauri ko samun dama. Hakanan, ta hanyar ba da damar ɓoyewa zaku iya ɗaukar nauyin ɓangarorin gidan yanar gizon ku don samun saurin shiga. Akwai hanyoyi daban-daban na ɓoyewa da zaku iya amfani dasu amma gabaɗaya sun faɗa cikin ɗayan rukunoni biyu; ma'ajin abokin ciniki, ko ɓoyayyen ɓangaren uwar garke.

Karantar kayan kwastomomi-galibi (yawanci ɓoyayyen mai bincike) yana taimaka muku ƙayyade abubuwan da rukunin yanar gizonku ke adana a kan burauzar gidan yanar gizon baƙo. Hakanan yana ba ka damar tantance tsawon lokacin da aka adana waɗannan abubuwan don idan aka sabunta rukunin yanar gizon ka, mai binciken zai iya sabunta wuraren da abubuwan sabunta abubuwa. Binciken ɓoye yana aiki tare da abubuwa masu mahimmanci kamar CSS, JS, da hotuna.

Achingaddamar da kayan aiki shine kowace hanyar ɓoyewa wanda aka aiwatar akan sabar yanar gizonku. Wadannan na iya hadawa OPcode caching, Shafin shafi, tarin bayanai, da ƙari. Kowane ɗayan waɗannan hanyoyin yana ma'amala da abubuwa daban-daban na WordPress da haɓakawa akan su na iya taimakawa inganta ayyukan rukunin yanar gizon mu.

Misali, WordPress yana da matukar mahimmanci-tushen bayanai. Abun takaici, duk wasu matakai da suke aiki tare da tarin bayanai gabaɗaya suna buƙatar albarkatu da yawa (ikon sarrafawa da ƙwaƙwalwar ajiya) don gudana. Tare da ɓoye bayanan bayanai, abin da kuke yi shine adana sakamako na tambayoyin da suka gabata a ƙwaƙwalwar don rage lokacin da aka toauka don isar da wasu sakamako.

Magani 1: Sanya kayan talla masu kyau

Kashewa shine ɗayan mahimman hanyoyin da zaku iya inganta ayyukan gidan yanar gizonku na WordPress. Abin godiya, kamar yadda yake tare da duk abubuwan da ke da alaƙa da WordPress akwai abubuwan da zaka iya amfani dasu don taimakawa da wannan. Wasu kyawawan misalai na WordPress caching plugins sun haɗa da WP Rocket da kuma  Gyara Ayyukan.

Magani 2: Enable OPCache akan mai masaukin yanar gizan ku

Ta hanyar adana lambobin aiki na rubutattun rubutun PHP, OPcache tana bawa shafuka damar hidimar shafin cikin sauri. Labari mai dadi shine mafi yawan masu ba da tallatawa masu ba da izinin ba masu amfani damar shigar da OPcache tsawo daga rukunin sarrafa su. Don haka - don yin amfani da wannan zaɓin don ɗora shafin yanar gizonku cikin sauri, shiga kawai cikin rukunin kula da karɓar bakuncinku kuma ba da damar wannan aikin.

Misali: Don kunna OPCache a A2 Hosting, shiga zuwa cPanel> Software> Zaɓi sigar PHP> Shigar da ƙarin PHP.

2. Databases da aka adana a cikin HDD

Kusan ba tare da gazawa ba, yawancin masu samar da gidan yanar gizo a yau zasu tallata cewa suna ba da Solid State Drive (SSD) mafita. SSDs shine fasalin fasaha ta zamani na rumbun kwamfutar gargajiya kuma suna da sauri sosai. Koyaya, duk da faɗuwar farashin SSD, har yanzu suna da tsada fiye da injunan injuna na injuna.

Saboda wannan, wasu masu ba da sabis na baƙi na iya ƙoƙarin gudu tare da saitin matasan. Zasu gudanar da aikace-aikace a kan SSD amma suna amfani da rumbun adana gargajiya don adanawa. Wannan mummunan labari ne ga masu amfani da WordPress tunda da alama bayanan zai kasance a hankali, mashin injina maimakon SSD. Tabbatar da lura cewa ko mai ba da sabis ɗin ku yana ba da cikakkiyar maganin SSD ko a'a.

Magani: Tsaya tare da kamfanoni masu ba da sabis waɗanda ke ba da cikakkiyar karɓar baƙon SSD

ssd gizon yanar gizo
Misali: Duk gidajen yanar sadarwar da aka shirya a SiteGround yana gudana akan diski na SSD - wanda shine manufa don shafukan WordPress.

Duk da kasancewa ɗaya daga cikin mafi arha WP hosting a kasuwa, Hostinger yana gudana akan cikakken ajiyar SSD - yana sanya su manufa don ɗaukar rukunin yanar gizo na WordPress. Sauran sanannun samfuran da ke aiki akan cikakkiyar SSD sun haɗa da: A2 Hosting, BlueHost, Da kuma SiteGround.

3. Tsoffin PHP

WordPress tushen PHP ne kuma sigar PHP da sabar ka ke gudana zata iya shafar aikin shafin ka. PHP 7 an gwada don fitar da PHP 5.6 da kusan ninki biyu na saurin - wannan shine ƙaruwa 100% cikin aiki!

Atungiyar a AeroSpike ta gudu wasu gwaje-gwaje don kwatanta PHP 5 da PHP 7.

Gwajinsu ya ƙaddamar da matakai huɗu, kowannensu yana gudanar da ma'amaloli 100,000. Dukkanin gudanar anyi su ne akan wani dunƙulen dunƙule mai gudana 3.9.1 sigar Editionaukin Communityungiyar Sadarwar Sadarwar Sadarwar Sadarwa akan CentOS 7 tare da masu sarrafa 32 Intel (R) Xeon (R) CPU E5-2660 @ 2.20GHz .

Siffofin PHP guda biyu da aka yi amfani da su sune php-7.0.10 da php-5.5.38.

A ƙasa akwai taƙaitaccen sakamako.

Jimlar Lokacin zartarwa

Jimlar Lokacin Kisa - PHP7 vs PHP5
PHP 7 duka lokacin aiwatarwa shine ~ 10 - 12% ƙasa da PHP 5 (ƙasa mafi kyau).

Ayyuka a kowane dakika

Ayyuka a kowane dakika - PHP 7 da PHP 5
PHP 7 ya rubuta / karanta ~ 9 - 15% ƙarin kwatankwacin PHP 5 (mafi girma shine mafi kyau).

Magani: Sabunta shafin yanar gizonku na PHP

Idan kuna gudana akan tsoffin sigar PHP akwai yiwuwar zaku ga ingantattun saurin haɓaka kawai ta hanyar zaɓar sabon sigar PHP. Yawancin masu samar da gidan yanar gizo zasu ba da nau'ikan nau'ikan PHP da yawa waɗanda zaku iya zaɓar ta hanyar rukunin kula da gidan yanar gizonku.

Misali - Zaɓin sigar PHP ɗinka a Hostinger za a iya yin ta hanyar rukunin kulawar kulawar ku.

4. HTTP / 2

HTTP / 2 shine "Sabon" yarjejeniyar Intanet wanda aka gabatar dashi a shekara ta 2015. Sabanin sigar da ta gabata HTTP 1.1, yana ba da damar buƙatun buƙatun bayanai da yawa a lokaci guda. Wannan yana taimakawa rage lokacin lodawa don kadarorin gidan yanar gizon ku.

HTTP / 2
HTTP / 1.1 vs HTTP / 2 - HTTP / 2 na iya aika buƙatun da yawa don bayanai sama da haɗi ɗaya. Wannan yana rage ƙarin lokacin tafiye-tafiye (RTT), yana sanya gidan yanar gizonku da sauri (koyi).

Magani: Aiwatar da HTTP / 2 

Duk da wannan, duk da haka, wasu rukunin yanar gizon har yanzu basa bayar da HTTP / 2 ko kawai suna bayar da shi akan tsare-tsaren da suka fi tsada. Akwai hanyoyi biyu da zaku iya amfani da HTTP / 2; nemi mahaɗan da ke ba da shi, ko yin amfani da Cloudflare CDN.

Akwai masu samar da gidan yanar gizo waɗanda ke ba da matakan HTTP daban-daban. Misali, siteground da kuma GreenGeeks Ya sanya HTTP / 2 a kan duk shirye-shiryen su, amma A2 Hosting kawai suna ba da HTTP / 2 akan shirye-shiryen karɓar gidan yanar gizon su na Turbo ko sama.

5. Saurin Server

Shafukan yanar gizo na atomatik ne kuma yawan albarkatun da suke dasu zai iya shafar ayyukansu. Kowane rukunin yanar gizo yana buƙatar samun ikon sarrafawa da ƙwaƙwalwar ajiya don ɗaukar zirga-zirgar yanar gizo - mafi girman ƙarar, yawancin albarkatun da ake buƙata.

Idan gidan yanar gizonku yana da kwararar baƙi kwatsam, shirin karɓar bakuncinku bazai da wadatar da zata iya ɗauka duka lokaci ɗaya. Wannan zai haifar da shafin ko raguwa ko rashin samuwa ga wasu buƙatun.

Saka idanu kan ayyukan bakuncin ku

Kula da ayyukan gidan yanar gizon ku
Example: Yanar gizoPulse yana ba da kayan aikin kulawa daban-daban waɗanda ke kiyaye kullun akan sabar ku da gidajen yanar gizon ku.

Halin zai iya faruwa ne akan shirye-shiryen haɗin gwiwar da aka raba tunda duk asusun kan wannan sabar suna raba adadin kayan aiki. Don tabbatar da cewa rukunin yanar gizonku yana gudana lami lafiya, gwada amfani da kayan aikin saka idanu kamar Mai amfani da Robot, Yanar Gizo Pulse, Da kuma Sabuwa.

Amfani da waɗancan kayan aikin zai taimake ka ka yi hukunci a kan ɗan lokacin da mai gidan ka ke aiki. Idan rukunin yanar gizonku yana ci gaba da raguwa ko sabar koyaushe tana ƙasa, zai iya zama lokaci don la'akari da sauyawa zuwa kyakkyawan tsari ko mahaɗan gidan yanar gizo gaba ɗaya.

Magani: Haɓakawa zuwa VPS ko haɓaka matakin sama idan ya cancanta

Misali: Dangane da bin diddiginmu a Mai watsa shiri, SiteGround VPS mai karbar lokacin amsawa (shafin gwajin da aka shirya a Turai) yana da kusan 15% sauri fiye da SiteGround shared hosting.

Shirye-shiryen biyan kuɗi na VPS sun fi tsada fiye da shirye-shiryen karɓar talla amma ana iya ɗaukar cunkoson ababen hawa cikin sauƙi. Wannan saboda VPS shirya shirye-shirye gabaɗaya za a iya daidaita su, ma'ana za ku iya haɓaka yawan albarkatun kuzari idan kun ji cewa rukunin yanar gizonku yana buƙatar ƙari.

6. Fayilolin Media Masu Yawa

Duk da yake babba, hotuna masu kaifi ko bidiyo masu ban sha'awa na iya zama alewa mai kyau, kar a tuna cewa waɗannan fayilolin na multimedia galibi suna da girma. A matsayinka na mai yatsan hannu, babban fayil shine mafi tsayin lokacin da za a ɗauka.

Wannan ba yana nufin cewa lallai ne ku yashe su gaba ɗaya ba, amma aƙalla ku tuna don inganta fayilolinku.

Magani: Damfara hotunanka

Za'a iya saukar da hotuna da ɗan amfani kuma amfani da madaidaicin tsari na iya taimakawa rage girman. Misali, fayil na BMP galibi zai fi GIF ko JPG girma. Don inganta hotuna, zaku iya zaɓar yin hakan da hannu ko ta amfani da plugin. Wasu WordPress plugins waɗanda zasu iya yin dabarar sun haɗa da EWWW da kuma Gajeren fayel.

Idan ka yanke shawarar kada kayi amfani da plugin akwai kuma kayan aikin kan layi wanda zaka iya amfani dasu don inganta hotuna da hannu. Wasu daga cikin waɗannan sune Optimizilla da kuma EzGIF.

7. Bady Ingantaccen / gurbataccen Database

Tun da farko na ambata game da yadda WordPress ke da matukar mahimmanci-tushen bayanai da kuma yadda ajiyar SSD zai iya taimakawa saurin saurin tambayoyi. Koyaya, yanayin bayanan ma yana taka rawa wajen aiwatar da shafinku.

Magani: Inganta bayanai akai-akai

Yana da matukar wahala ka sarrafa duk wani abu daya shiga cikin ma'ajiyar bayanan ka, don haka lokaci-lokaci, kana bukatar yin wasu ayyukan gidan. Wannan zai taimaka adana bayanan bayanan ku kuma iya aiki cikin sauri.

Hakanan akwai plugins waɗanda zaku iya amfani dasu don wannan. Wasu misalai masu kyau sune WP DBManager da kuma WP shafa.

8. Slow mai ba da sabis na DNS

Mutane da yawa suna jin cewa Lokaci zuwa Farko Byte (TTFB) shine mafi girman ma'auni amma yawancin ba su fasa TTFB ba kuma suna ƙoƙari su magance abubuwan da ke cikin su. Ofaya daga cikin abubuwan da ke ba da gudummawa ga TTFB shine ƙudurin DNS.

Wannan tsari wanda ya shafi fassarar sunayen yanki zuwa adiresoshin IP yana ɗaukar lokaci. Daban-daban masu ba da sabis na DNS suna yin daban kuma ta amfani da mai ba da sabis na DNS mai kyau na iya hanzarta saurin yin amfani da shafin ku.

Magani: Canja zuwa mafi kyawun mai ba da sabis na DNS

Don bincika saurin DNS ɗinku, gudanar da gwaji akan rukunin yanar gizonku ta amfani da Pingdom Tools sannan danna maballin farko na sunan yankinku a cikin jadawalin sakamako. Wannan zai fadada akwatin da zai nuna maka abubuwan da aka tsara na TTFB. A cikin wannan akwatin, nemi layin da ke faɗin “DNS”.

Gudun DNS ya bambanta dangane da mai bada.

Kwatanta shi da haɗakar saurin DNS na masu samarwa daban-daban akan ginshiƙi a DNS Perf kuma la'akari idan saurin DNS ɗinku shine inda yakamata ya kasance. Idan ba haka ba, zabi don wani mai ba da sabis na DNS na iya zama da amfani ga saurin saurin shafin ka.

Cloudflare yana ɗaya daga cikin shahararrun masu samarda DNS kusa kuma zaka iya samun asusu tare dasu kyauta.

9. ugari ga Plugins

Ofaya daga cikin abubuwan da mutane suke so game da WordPress shine yadda sauƙi yake don haɓaka ayyuka kawai ta amfani da plugin. Saboda yana buɗewa, WordPress yana da babbar al'umma masu tasowa wanda ke da kyau don zaɓin, amma yana haifar da ƙarin abubuwa waɗanda suka bambanta ƙwarai da gaske.

Hakanan kari sune kari zuwa lambar WordPress ta asali, ma'ana cewa mafi yawan amfani da ku, mafi girman misalin ku na WordPress zai kasance. Wannan kuma yana ƙara zuwa saman shafin ku kuma yana iya shafar aikin zuwa digiri daban-daban.

Magani: Rage amfani da abubuwan amfani

Inda zai yuwu ku tabbata cewa kawai kuna yin aikin plugins ɗin da kuke buƙata da gaske kuma kuyi ƙoƙari ku datse fuka mara amfani. Hakanan, tuna tuna cire duk wasu abubuwa da basuda amfani! Akwai abubuwa da yawa da yawa a yau waɗanda suke ƙoƙarin cim ma abubuwa daban-daban, don haka inda zai yiwu a yi ƙoƙarin tabbatar da cewa abubuwan da aka kera su ba kwafinsu ba.

10. Yanar Gwanin

A baya, masu fashin kwamfuta suna amfani da shafin don haifar da tashin hankali kawai don harbawa. Babban ɗan adam na yau ya zama mafi wayewa kuma zaiyi ƙoƙari ya guje ka gano kasancewar su. Manufar su ita ce yin amfani da albarkatun kan asusunku don wadatar da kansu - misali ta amfani da shi don hakar ma'adinai.

Wannan yana kwashe albarkatu daga rukunin yanar gizonku kuma yana iya yin tasiri sosai akan aikin. Saboda suna yawo a karkashin radar, kana bukatar ka binciki shafin ka a kai a kai don tabbatar da cewa ba a satar shi da shiru ba.

Sanya jari a kayan aikin tsaro daga mai bayarda mafita na tsaro kamar Sucuri kuma tabbatar cewa kun sanya plugins daga amintattun kafofin. Don bincika idan abubuwan haɗin ku na halal ne, yi amfani da kayan aiki kamar Tantance Checker Checker don bincika batutuwa.

Don kauce wa rikitarwa, gwada bincika suna na plugin kafin ma girka shi.

Kammalawa: Mayar da hankali kan Cikakkun bayanai

Kamar yadda kake gani zuwa yanzu, gudanar da ingantaccen shafin yanar gizo na iya zama kusan cikakken aiki. Koyaya, idan kun lissafa ƙasa kuma kuna bin kyawawan halaye akai-akai, zaku sami damar rage damar samun damar yin amfani da shafin yanar gizon WordPress kamar yadda yake na biyu. Ka tuna ka mai da hankali kan aiki a duk abin da kake yi kuma ka yi la'akari da duk abin da kake son ƙarawa zuwa rukunin yanar gizon ka. Yawancin sabbin masu amfani da shafin yanar gizon WordPress suna son wuce gona da iri a cikin komai amma bankin girki.

Guji wannan jarabar kuma sannu a hankali a kan aiki yayin da rukunin yanar gizonku da kasuwancinku ke haɓaka.

Game da Jerry Low

Founder of WebHostingSecretRevealed.net (WHSR) - nazarin bita da aka yi amfani da shi ta hanyar masu amfani da 100,000. Fiye da shekaru 15 kwarewa a yanar gizon yanar gizon, tallace-tallace haɗin gwiwa, da SEO. Mai ba da gudummawa ga ProBlogger.net, Business.com, SocialMediaToday.com, da sauransu.