Girkawa da daidaitawa WordPress 4.5 Multisite akan Debian Jessie

Gaisuwa jama'a. Kwanan nan na haɗu da buƙatar shigarwa da saita sabon sigar WordPress tare da yiwuwar samun yanar gizo sama da ɗaya a cikin shigarwa ɗaya kuma abin da yafi kyau a ciki Debian Jessie A wannan karon zan kawo muku yadda nayi ne ta yadda idan a kowane lokaci yana da amfani ko kuma ban sha'awa, yi shi ba tare da daukar wani dogon lokaci ba kuma komai yana aiki yadda ya kamata don abin da ake fata. Wannan shigarwa ne akan sabar gida da kuma ta ƙananan ƙananan hukumomi.

Zamu fara da shigarwa na mu GLAMP uwar garke, amfani MariaDB maimakon MySQL (don ɗanɗano na mutum amma yana iya zama tare da MySQL idan kun fi so):

  1. Muna shiga cikin tasharmu azaman tushe kuma fara shigarwa na sabar yanar gizo ta Apache:
# gwaninta shigar apache2
  1. Muna ci gaba tare da shigar da sabar da kuma matattarar bayanan:
# ƙwarewa shigar da abokin cinikin mariadb-abokin ciniki
  1. Daga baya zamu girka PHP da wasu fakiti don tallafin MariaDB a cikin PHP:
# ƙwarewa shigar php5 libapache2-mod-php5 php5-mysqlnd php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-pspell php5-recode php5-smpp shirya php5-xmlrpc php5-xsl
  1. Mun sake farawa Apache:
# systemctl sake farawa apache2
  1. Idan muna son kara saurin shafukan a cikin PHP kadan kadan, za mu girka APCu PHP Kache sannan mu sake kunna Apache kuma:
# ƙwarewa shigar php5-apcu
# systemctl sake farawa apache2

Tunda muna da sabar GLAMP ɗinmu a shirye, yanzu zamu ci gaba da shigarwa na sabon sigar WordPress (4.5 a yanzu):

  1. Mun shiga MariaDB a matsayin mai gudanarwa daga zaman mai amfani ko tushenmu, don ƙirƙirar ɗakunan bayanai, masu amfani da amfani da gatan su:
$ mysql -u tushen -p
Irƙirar DATABASE bdwp1;
KIRKI MAI AMFANI da wpususer1 @ localhost GANE DA 'kalmar sirri';
KA BAWA DUKKAN FALALOLI bdwp1. * TO wpususer1 @ localhost;
FLUSH KUMA;
fita
  1. Mun sake farawa Apache da MariaDB:
# systemctl sake farawa apache2
# systemctl sake farawa mysql
 
  1. Mun shigar da WordPress ta hanya mai amfani ta hanyar tashar:
# cd / tmp
# wget -c http://wordpress.org/latest.zip
# unzip -q latest.zip -d / var / www / html /

Idan muna son tantance kundin rubutun kalmomi tare da suna daban da wanda muke so zuwa na farko, zamu canza shi kamar haka:

# mv / var / www / html / wordpress / var / www / html / wpmultisite1

Kuma muna ci gaba tare da sanya gata ga mai amfani www-data:

# chown -R www-data.www-data / var / www / html /karafarini1
# chmod -R 755 / var / www / html /karafarini1
# mkdir -p / var / www / html /karafarini1/ wp-abun ciki / loda
# chown -R www-data.www-data / var / www / html /karafarini1/ wp-abun ciki / loda

Yanzu muna ƙirƙirar da shirya babban fayil ɗin daidaitawa don ayyana ƙimar bayananmu da mai amfani da aka ƙirƙira a baya a cikin MariaDB:

# cd / var / www / html / wpmultisite1
# cp wp-jituwa-sample.php wp-config.php
# Na ga wp-config.php (ko tare da editan abubuwan da kuka fi so emacs, nano, gedit, paadipad ko wasu)

Canza wannan sashin asalin abun ciki:

// ** Saitunan MySQL - Kuna iya samun wannan bayanin daga gidan yanar gizon ku na yanar gizo ** //
/ ** Sunan database don WordPress * /
ayyana ('DB_NAME', 'database_name_here');

/ ** Sunan mai amfani na MySQL * /
ayyana ('DB_USER', 'sunan mai amfani_a nan');

/ ** MySQL kalmar sirri kalmar sirri * /
ayyana ('DB_PASSWORD', 'password_here');

Kamar haka:

// ** Saitunan MySQL - Kuna iya samun wannan bayanin daga gidan yanar gizon ku na yanar gizo ** //
/ ** Sunan database don WordPress * /
ayyana ('DB_NAME', 'bdwp1');

/ ** Sunan mai amfani na MySQL * /
ayyana ('DB_USER', 'wpusuari1');

/ ** MySQL kalmar sirri kalmar sirri * /
ayyana ('DB_PASSWORD', ')kalmar sirri');

Mun adana canje-canje kuma mun rufe fayil ɗin. Yanzu zamu tafi kan burauzar gidan yanar gizon mu kuma a cikin sabon shafin mun buɗe mai saka WordPress tare da URL mai zuwa:

http://localhost/wpmultisite1/

A cikin fuskokin da zasu bayyana a kasa, mun zabi yaren da aka sanya, taken shafin yanar gizon, sunan mai amfani, kalmar wucewa, imel kuma a wannan yanayin ba zamu yiwa akwatin karshe na "Bada bayanan shafi" kamar yadda yake ba Shiga gida ne.

Yanzu zamu iya shiga cikin shigarwar WordPress. A ƙarshe za mu yi sanyi zama dole don WordPress mu zama mai yawa:

  1. Muna kunna hanyar sadarwa mai yawa ta hanyar ƙara layi mai zuwa ta hanyar editan rubutu da muka fi so a cikin fayil wp-config.php, kusa da layin da yake faɗin «/ * Hakanan, dakatar da gyara! Gwajiyar farin ciki. * /":

/ * Multisite * /
ayyana ('WP_ALLOW_MULTISITE', gaskiya ne);

Barin wannan sashin fayil ɗin kamar haka:

/ **
* Ga masu haɓakawa: Yanayin debugging na WordPress.
*
* Canja wannan zuwa gaskiya don ba da damar nuni a yayin ci gaba.
* Ana ba da shawara mai ƙarfi cewa plugin da masu haɓaka taken suyi amfani da WP_DEBUG
* a yanayin cigaban su.
*
* Don bayani game da sauran abubuwan da za a iya amfani dasu don yin kuskure,
* ziyarci Codex.
*
* @ link https://codex.wordpress.org/Debugging_in_WordPress
/
ayyana ('WP_DEBUG', ƙarya);
/
multisite /
ayyana ('WP_ALLOW_MULTISITE', gaskiya ne);
/
Shi ke nan, daina gyara! Abin farin ciki a yanar gizo. * /

/ ** Hanyar kuskure zuwa gareshin WordPress. * /
idan (! bayyana ('ABSPATH'))
ma'anar ('ABSPATH', sunan lakabi (FILI). '/');

Mun adana canje-canje kuma mun rufe fayil ɗin.

  1. Muna kunna tsarin Mod_Rewrite na Apache:
# a2enmod sake rubutawa
  1. Muna shirya fayil ɗin Apache /etc/apache2/sites-enabled/000-default.conf ta hanyar editan rubutu da muka fi so, tare da ƙara abubuwan da ke gaba:


Lissafin Zaɓuɓɓuka FollowSymLinks MultiViews
AllowOverride Duk
Order bada izinin, ƙaryatãwa
ba da damar daga duk

Don ba da damar canje-canje daga fayil ɗin WordPress .htaccess da za mu gyara daga baya, mu bar wancan sashin abubuwanmu a cikin /000-default.conf kamar haka:

#Haka hada-da / wadatar-cgi-bin.conf
 
                 Lissafin Zaɓuɓɓuka FollowSymLinks MultiViews
                 AllowOverride Duk
                 Order bada izinin, ƙaryatãwa
                 ba da damar daga duk
 

  1. Mun sake kunna Apache
# systemctl sake farawa apache2
  1. Yanzu za mu je gabanmu na WordPress kuma a cikin babban panel a gefen hagu, za mu zaɓi zaɓi «Kayan aiki» kuma a cikin wannan “Tsarin hanyar sadarwa”:

WP_DL1 WP_DL2 Da zarar an shigar da taken cibiyar sadarwa da adireshin imel ɗinku, za mu danna don kafawa kuma nan da nan allon mai zuwa zai bayyana:

WP_DL3 A cikin halin da nake ciki an nuna dabi'un da suka dace da / var / www / html / wpmultisite1 dangane da sunan da na zaɓa don kundin adireshina na WordPress da ake kira iibi maimakon wpmultisite1: / var / www / html / iibi. Yanzu bin umarnin da ke wannan taga, za mu kwafa abubuwan da ke cikin matakin farko ko akwatin zuwa fayil ɗinmu na wp-config.php ta hanyar editan rubutunmu sama da layin da ya ce «/ * Hakanan, dakatar da gyara! Gwajiyar farin ciki. * /»Kasancewa kamar haka:

/ **
* Ga masu haɓakawa: Yanayin debugging na WordPress.
*
* Canja wannan zuwa gaskiya don ba da damar nuni a yayin ci gaba.
* Ana ba da shawara mai ƙarfi cewa plugin da masu haɓaka taken suyi amfani da WP_DEBUG
* a yanayin cigaban su.
*
* Don bayani game da sauran abubuwan da za a iya amfani dasu don yin kuskure,
* ziyarci Codex.
*
* @ link https://codex.wordpress.org/Debugging_in_WordPress
/
ayyana ('WP_DEBUG', ƙarya);
/
multisite /
ayyana ('WP_ALLOW_MULTISITE', gaskiya ne);
ayyana ('MULTISITE', gaskiya ne);
ayyana ('SUBDOMAIN_INSTALL', na ƙarya);
ayyana ('DOMAIN_CURRENT_SITE', 'Your.IP.address');
ayyana ('PATH_CURRENT_SITE', '/ iibi /');
ayyana ('SITE_ID_CURRENT_SITE', 1);
ayyana ('BLOG_ID_CURRENT_SITE', 1);
/
Shi ke nan, daina gyara! Abin farin ciki a yanar gizo. * /

Mun adana canje-canje kuma mun rufe fayil ɗin. Muna yin hakan tare da abun ciki na mataki na biyu ko akwatin amma yanzu muna gyara fayil ɗin .htaccess ta hanyar hanyar:

# vi /var/www/html/iibi/.htaccess

Share duk abubuwanda yake ciki da manna wanda yake cikin akwatin, kamar haka:

A sake rubutawa
RewriteBase / iibi /
RewriteRule ^ index.php $ - [L]

# aara sashin layi zuwa / wp-admin
Sake rubutaRule ^ ([_ 0-9a-zA-Z -] + /)? Wp-admin $ $ 1wp-admin / [R = 301, L]

Sake sake rubutawa% {REQUEST_FILENAME} -f [OR]
Sake sake rubutawa% {REQUEST_FILENAME} -d
RewriteRule ^ - [L]
Sake RubutaRule ^ ([_ 0-9a-zA-Z -] + /)? (Wp- (abun ciki | admin | ya hada da). *) $ 2 [L]
Sake Rubuta Rule ^ ([_ 0-9a-zA-Z -] + /)? (. *. Php) $ $ 2 [L]
Sake rubutawaRule. index.php [L]

Mun adana canje-canje kuma mun rufe fayil ɗin. Mun fita daga WordPress kuma mun sake shigar dashi.

  1. A ƙarshe mun gwada WordPress ɗinmu tuni tare da cikakken aiki da kuma daidaita ayyukan multisite. Don wannan muke zuwa gefen hagu na sama, zaɓi "Shafuka na", "mai kula da hanyar sadarwa" da "Shafuka". Mun zaɓi zaɓi "Addara sabo" a saman kuma a allon na gaba muna ayyanawa a cikin filayen rubutu "Adireshin yanar gizo (URL)" (suna don sabon rukunin yanar gizonku), "taken shafin", "Yaren shafin" , «Imel mai gudanarwa» kuma mun danna «siteara shafin». Yanzu shafukan da ka kirkira zasu bayyana a "Shafina" kuma zaka iya tsara su ta hanya daya ta tebur dinka. Duk wani abu da baya jinkirta tambaya ko raba ra'ayoyinku. Gaisuwa.

Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

2 comments, bar naka

Bar tsokaci

Your email address ba za a buga. Bukata filayen suna alama da *

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.

  1.   Alejandro m

    Kyakkyawan koyawa !!

  2.   jatan m

    Na gode sosai Alejandro. Detailaya daga cikin daki-daki babu komai. Lokacin da nake kirkirar labarin a layukan da ke dauke da halayen manzo (') ya yi kama da wannan, amma yanzu an canza su zuwa maganganu guda (' da ') a wasu layuka kamar haka: ayyana (' WP_ALLOW_MULTISITE ', gaskiya ne); kuma nayi kokarin gyara shi dan kokarin shirya labarin amma sai kawai na samu "Duba". Don Allah idan wani daga editoci ko masu gudanarwa na Daga Linux suka ga wannan tsokaci, ku gaya mani yadda zan iya shirya labarin don gyara wannan dalla-dalla ko yin canjin don Allah. Gaisuwa.