Otu esi etinye WP-CLI na Linux Server maka WordPress

WP-CLI is interface iwu-ahịrị maka WordPress. The WP-CLI bụ ngwa na-enyere gị aka ịmekọrịta na gị WordPress saịtị ozugbo site na iji iwu na interface dabere na ederede. Ọ dịkwa oke oke, na-egosipụta iwu dị iche iche nwere ike ime. Ihe fọrọ nke nta ka ọ bụrụ ihe ọ bụla ị nwere ike ime na azụ azụ nke saịtị gị, ị nwere ike ime ngwa ngwa site na iji WP-CLI.

N'ime nkuzi a, ị ga-amụta otu esi etinye WP-CLI na sava Linux ọ bụla.

Prerequisites

  • OS akwadoro: Sistemụ arụmọrụ Linux ọ bụla.
  • Akụrụngwa achọrọ: WordPress
  • Akaụntụ onye ọrụ: Akaụntụ onye ọrụ nwere sudo ma ọ bụ ohere mgbọrọgwụ.
  • Ngwungwu akwadoro: curl ma ọ bụ wget

Advertisement


Wụnye WP-CLI na Linux

Ụzọ kachasị mfe na akwadoro iji wụnye WP-CLI on your Server Linux bụ ibudata na Phar faịlụ. N'ime nkuzi a n'okpuru, ị ga-ahụ ọmụmaatụ sitere na otu Ihe nkesa Ubuntu 20.04. Agbanyeghị, iwu ndị a ga-arụ ọrụ na ọtụtụ Sistemụ arụmọrụ Linux.

Mbụ, budata faịlụ phar site na iji curl jiri iwu a nyere iwu:

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

Ọzọ, ịkwesịrị ịchọpụta na faịlụ ahụ na-arụ ọrụ nke ọma dịka ndị a:

php wp-cli.phar --info

Ị ga-achọ ugbu a ime WP-CLI nwere ike ime ya site na iji iwu a:

chmod +x wp-cli.phar

N'ikpeazụ, bugharịa executable:

sudo mv wp-cli.phar /usr/local/bin/wp

Iji nwalee ma ọ bụrụ WP-CLI arụnyere nke ọma, jiri iwu a:

wp --info

Ihe atụ n'okpuru:

Na-emelite WP-CLI

Ka iwelite WP-CLI bụ usoro dị mfe. Ọ nwekwara nhọrọ kwụsiri ike na nhọrọ abalị maka ndị ọzọ egwuregwu.

Ka imelite site n'iji ọkọlọtọ kwụ ọtọ, jiri iwu a:

wp cli update

Mara, ma ọ bụrụ na faịlụ a nwere mgbọrọgwụ, ị nwere ike iji ohere sudo dị ka ndị a:

sudo wp cli update

Iji wụnye ihe owuwu abalị, jiri ihe ndị a:

wp cli update --nightly

Advertisement


Okwu na mmechi

N'ime nkuzi, ị mụtala otu esi etinye ya WP-CLI on your Linux ihe nkesa. N'ozuzu, WP-CLI dị mma, karịsịa maka ịgba ọsọ ụfọdụ cron site na ụfọdụ plugins nwere nkwado WP-CLI. Ọ nwere ike ịbụ njirimara na akụrụngwa bara uru ịnwe n'ozuzu ma ọ bụrụ na ị na-arụ ọrụ WordPress.

Maka ozi ndị ọzọ maka iji WP-CLI, gụọ ndu mbido ngwa ngwa.

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