Otu esi etinye WP Rocket Cache na WordPress n'ime RAM na TMPFS

WP Kaiser bụ otu n'ime ndị a na-akwanyere ùgwù WordPress caching plugins na ahịa. WP Kaiser cache na-echekwa ibe weebụ niile dị ka faịlụ HTML, na-ebelata mkpa WordPress ibu ụzọ buru ibu, wee zipu ajụjụ na nchekwa data WordPress iji chọpụta isiokwu, plugins, na ọdịnaya ị ga-ebu, nke nwere ike ịdị ngwa ngwa yana ịtụ ụtụ na sava ahụ na-eduga n'ịbawanye ibu dị elu.

Iji usoro nchekwa ọ bụla ga-enye uru ozugbo ma melite oge ma e jiri ya tụnyere ịghara iji usoro cache mee ihe n'ọtụtụ ọnọdụ, Otú ọ dị, ịme ya otu nzọụkwụ n'ihu bụ iji caching na RAM, karịsịa maka saịtị ndị nwere ike ịzụ ahịa site na iji usoro nchịkọta faịlụ omenala enweghị ike ịdị irè. na oge ibu na ọsọ ọbụna na SSDs, na-ewepụ ọtụtụ ọgụgụ na-ede na-ebelata ndụ nke draịvụ ike.

Yabụ kedu ihe bụ TMPFS? tmpfs na-eji nchikota RAM kọmputa na oghere SWAP dabere na diski iji mepụta sistemu faịlụ, dị ka EXT4, nke sistemụ arụmọrụ nwere ike iji. N'ihi na tmpfs bụ dị na RAM, Ọ dị ngwa ịgụ na ide data na site na ya, ọtụtụ ugboro ngwa ngwa karịa SSD, ya mere ijikọta usoro a na WP Rocket nwere ike iburu ya na ọkwa ọzọ nke arụmọrụ.

N'ime nkuzi a, ị ga-amụta otu esi ebugo WP Rocket Plugin maka WordPress n'ime sava Linux ọ bụla.

Disclaimer

Emebere nkuzi na usoro a maka naanị sava raara onwe ya nye.


Advertisement


Prerequisites

  • OS akwadoro: Ihe nkesa Linux dị ọhụrụ nwere ohere ọnụ.
  • Akaụntụ onye ọrụ: Akaụntụ onye ọrụ nwere sudo ma ọ bụ ohere mgbọrọgwụ.
  • Akụrụngwa achọrọ: WordPress na Ngwa mgbakwunye WP Rocket

Ugwu WP Rocket Cache n'ime RAM

Iji hazie cache WP Rocket iji buo TPMFS n'ime Ram bụ usoro dị ngwa gbajiri mpaghara abụọ. Enwere ike iji usoro a ọ bụghị naanị maka WP-Rocket kama faịlụ ọ bụla dabere na cache.

Adịla n'ọnọdụ ọ bụla echela ịkwalite arụmọrụ iji TMPFS na ndekọ ndekọ WordPress gị dum! Ị ga-akwa ụta na nke a mgbe ịmalitegharịa ihe nkesa ahụ wee tufuo data emebere maka faịlụ nwa oge dị ka cache.


Advertisement


Jiri TMPFS buo cache WP Rocket na Terminal

Nzọụkwụ mbụ na ọdụ Linux gị bụ iji bulie folda ahụ TMPFS. Dị ka WP Rocket cache emeberela ma dị na /wordpress-location/wp-content/cache/wp-rocket Naanị ihe ị ga - eme bụ ịtụle RAM ole ị ga - eji bulie ya.

Dịka ọmụmaatụ, ihe nkesa gị nwere 16GB nke RAM, ma ị na-eji naanị 15 ruo 20%; ị nwere ike ịtọ 2 ruo 3 GB maka cache wee nyochaa uto ya na nha, yana na saịtị ndị ọzọ dị ịrịba ama, mụbaa ka ọ dị mkpa. Dịka ọmụmaatụ n'okpuru, a ga-eji 3GB.

Jiri iwu na-esonụ iji bulie TMPFS:

mount -t tmpfs -o size=3G tmpfs /wordpress-location/wp-content/cache/wp-rocket

Mara, ịkwesịrị itinye ụzọ zuru oke, ọmụmaatụ nwere ike ịbụ /var/www/html/wordpress/wp-content/cache/wp-rocket. Ihe ọzọ ị ga-echeta, iji TMPFS n'ime RAM dị ka iji draịvụ ike; ọ bụrụ na RAM agwụla dị ka draịvụ ike, ihe nwere ike ịgahie na saịtị WordPress gị ngwa ngwa; jide n'aka na ị ga-eme ka cache 25 ruo 50% buru ibu karịa ihe ị chọrọ na opekempe, na ị gaghị agba ọsọ n'ime ụlọ, cheta nkuzi a bụ maka sava raara onwe ya nye na enwere ihe onwunwe iji.

Iji mebie okwu a n'iwu:

  • -t - Ezipụta ụdị faịlụ a ga-etinye.
  • -o - Ezipụta nhọrọ na nha ịchọrọ ịnye.

Otu esi enyocha cache TMPFS

Ihe dị mma bụ ịlele ọkwa nke cache TMPFS gị bụ iji iwu a:

df -lh

Nke a ga-egosi ma ọ bụrụ na ị tinyela cache nke ọma, na nke abụọ, ojiji nke eji vs. dị ka i wee nwee ike ịbawanye ka ọ dị mkpa.

Ọmụmaatụ n'okpuru:

Dịka ị na-ahụ, anyị nwere oghere 6GB nke nwere 4.1 MB ejiri mee ihe, nke ha nhata 1% n'ozuzu ya, ya mere cache nwere ọtụtụ ohere maka uto. Lelee nke a mgbe mgbe, ọkachasị mgbe mbụ ị na-ebuga site na iji usoro TMPFS na WP Rocket Cache.


Advertisement


Bunye cache n'ime RAM na buut sistemụ

Site na ndabara, ihe ndọghachi azụ nke iji TMPFS ibunye faịlụ n'ime RAM bụ echekwara ya na ebe nchekwa na-agbanwe agbanwe kama ịbụ ngwaọrụ nchekwa na-adịgide adịgide. Na malitegharịa sistemụ arụmọrụ Linux, a na-ehichapụ ya. Iji tinye akwụkwọ ndekọ aha na-adịgide adịgide, ị ga-achọ idezi / wdg / fstab.

Nke mbụ, mepee / wdg / fstab iji ederede ederede ọ bụla; nkuzi ga-eji nano:

sudo nano /etc/fstab

Ugbu a, tinye ahịrị ndị a wee gbanwee ka mmasị gị dị:

tmpfs /wordpress-location/wp-content/cache/wp-rocket tmpfs defaults,size=3g 0 0

Ọmụmaatụ nke TMPFS etinyere na / wdg / fstab faịlụ.

Otu esi etinye WP Rocket Cache na WordPress n'ime RAM na TMPFS

Iji chekwaa (CTRL+O) wee pụọ (CTRL+X).

Wepụ WP roket cache na RAM

Ọ bụrụ na ịchọrọ iwepụ cache WP Rockets na RAM gị, jiri iwu a:

umount /wordpress-location/wp-content/cache/wp-rocket

Mara, ị nwere ike ịchọ sudo. Ọ bụrụ na ị na-enwe nsogbu iji iwu a, nwaa na:


umount -f /wordpress-location/wp-content/cache/wp-rocket

Advertisement


Okwu na mmechi

N'ime nkuzi a, ị mụtala ka esi ebugo WP Rockets cache n'ime RAM iji wepụta arụmọrụ ka mma. N'ozuzu, ngwọta a abụghị maka onye ọ bụla ma ọ bụ naanị maka sistemụ raara onwe ya nye na e kwesịghị ịnwale ya na gburugburu oke oke maka oke akụrụngwa na ihe nchekwa. Ọ bụrụ na ị nwere nnukwu ebe nrụọrụ weebụ na-arụsi ọrụ ike na ọtụtụ RAM na-ejighị ya eme ihe, iji usoro a kwesịrị ịhụ oge ibu gị na-ebelata na mmetụta ozugbo.

Idenye aha
Gwa nke
0 Comments
Inline nzaghachi
Lee echiche niile
0
Ga-ahụ n'anya gị echiche, biko okwu.x