Aiwatar da Amazon S3 don Blogs na WordPress

wordpress na amazon s3

lura: Tun rubuta wannan, tun daga lokacin muka ƙaura zuwa Flywheel tare da Sadarwar Sadarwa powered by StackPath CDN, CDN da sauri fiye da Amazon.378

Sai dai idan kuna kan kari, dandamali na karɓar bakuncin kamfanoni, yana da wahala a samu nasarar yin kasuwanci tare da CMS kamar WordPress. Rarraban lodi, ajiyar waje, sakewa, sakewa, da isarwar abun ciki basu zo da arha ba.

Yawancin wakilan IT suna kallon dandamali kamar WordPress kuma suna amfani dasu saboda sune free. Free dangi ne, kodayake. Sanya WordPress akan kayan tallatawa na yau da kullun da kuma masu amfani da lokaci guda dari zasu iya kawo rukunin yanar gizonku. Don taimakawa cikin aikin bulogina, wannan makon na canza girke-girke na na WordPress na tura duk hotunan daga Amazon S3 (Amazon Simple Storage Service). Wannan ya bar sabuwata don tura HTML kawai ta hanyar PHP / MySQL.

Amazon S3 yana samar da sauƙaƙe ayyukan yanar gizo wanda za'a iya amfani dashi don adanawa da kuma dawo da kowane adadin bayanai, a kowane lokaci, daga ko ina akan yanar gizo. Yana ba kowane mai haɓaka damar isa zuwa daidaitaccen daidaitawa, abin dogaro, mai sauri, kayan aikin adana bayanai masu rahusa waɗanda Amazon ke amfani da su don gudanar da nasa hanyar sadarwar yanar gizo ta duniya. Sabis ɗin na da nufin ƙara fa'idodi na sikelin da kuma ba da fa'idodin ga masu haɓakawa.

Don canza shafin don Amazon S3 ya ɗauki ɗan aiki, amma ga abubuwan yau da kullun:

  1. Shiga don Amazon Web Services.
  2. Loda foarin Firefox don S3. Wannan yana ba ku babban haɗin don sarrafa abun ciki a cikin S3.
  3. Add a guga, a wannan yanayin na kara www.dazazzarinka.zone.
  4. Add a CNAME to your Domain Registrar to nuna wani Reshen yanki daga shafin zuwa Amazon S3 don kama-da-wane hosting.
  5. Zazzage kuma shigar da kayan aikin WordPress don Amazon S3.
  6. Sanya ID din Mabuɗin Samun shiga na AWS da Maɓallin Sirrin kuma danna sabuntawa.
  7. Zaɓi ƙaramin yanki / guga da kuka ƙirƙira a sama don Yi amfani da wannan guga saiti.

wp-amazon-s3-saituna.png

Matakai na gaba sune ɓangaren nishaɗi! Ba na son yin hidimar abin da zai zo nan gaba daga S3, ina son in yi hidimar dukkan abubuwan ciki, gami da tallace-tallace, jigogi, da fayilolin mai jarida na baya.

  1. Na ƙirƙiri manyan fayiloli don ads, jigogi, Da kuma uploads a cikin bokiti na akan S3.
  2. Na goyi bayan duk abubuwan da nake ciki (hoto da fayilolin mai jarida) zuwa manyan fayilolin aiki.
  3. Na gyara fayil na CSS a cikin taken don cire duk hotunan daga www.martech.zone/tarai.
  4. Na yi wani MySQL bincike kuma maye gurbin kuma an sabunta kowane bayani game da abun cikin media don a nuna shi daga subdomain S3.
  5. Na sabunta duk bayanan hoto don tallan da za a nuna daga jakar talla a kan S3 Reshen yanki.

Daga nan zuwa gaba, Ina buƙatar shigar da kafofin watsa labaru zuwa S3 maimakon amfani da tsoho hoto upload tattaunawa don WordPress. Abun tallafi yayi kyakkyawan aiki wajen sanya gunkin S3 a daidai wurin da Loda / Saka gumaka a cikin WordPress admin.

Matsar da duk bayanan da kuma gudana akan S3 na wasu 'yan kwanaki yanzu ya haifar da $ 0.12 a cikin cajin S3, don haka ban damu da kudaden da ke ciki ba - wataƙila' yan daloli a wata shine abin da zai biya. Ta wani gefen fa'idar, idan na sami tarin baƙi, ya kamata in iya ɗaukar abubuwa da yawa fiye da abubuwan da ake gudanarwa a yanzu. Shafina yana loda shafin gida game da kusan 40% na lokacin da yake amfani dashi, don haka ina matukar farin ciki da matsar!

Abu mafi kyau game da wannan motsi shine cewa baya buƙatar ainihin ci gaba!

28 Comments

  1. 1

    Hi,

    Ina da asusun Amazon S3, amma bayan kokarin gano abubuwa, sai kawai na barshi saboda yana da wahala sosai. Shin Firefox addin na S3 yana sauƙaƙa shi da yawa?

    • 2

      Barka dai Ramin,

      Foarin Firefox ya kasance ainihin maɓallin keɓaɓɓe. Kuna buƙatar cikakken guga a wurin kafin abun aikin ya yi aiki - don haka ya sa ya zama mai kamawa.

      Doug

  2. 3

    Ya kamata in ƙara, kuna buƙatar nuna CNAME ɗin ku zuwa sabon sunan_unique_cloudfront_distribution_name.cloudfront.net maimakon zuwa naku_tarewa_subdomain.s3.amazonaws.com. Amma bayan wannan, zaku bi da shi kamar guga S3 na yau da kullun.

    Yana ƙara tsada yayin amfani da mafi girman saurin / ƙananan latency CloudFront zaɓi. Idan ka yanke shawara zaka gwammace ka koma ga misali S3, sai kawai ka canza CNAME dinka domin nunawa s3.amazonaws.com a maimakon haka.

    Kimanin shekara guda da ta wuce, na rubutahttp://www.carltonbale.com/tag/amazon-s3/"a 'yan rubutun blog akan Amaon S3 ga duk mai sha'awar.

  3. 4

    Idan kuna neman karin saurin gudu, juya Bokitinku na Amazon S3 zuwa guga na Amazon CloudFront, wanda ke haifar da ingantacciyar hanyar sadarwa ta duniya da yawa, Networkungiyar Rarraba entunshiyar latency. Anan hanyar haɗi tare da duk cikakkun bayanai: http://aws.amazon.com/cloudfront/faqs/

    Hakanan, wp-supercache plugin na iya ba da ƙimar sauri mai sauri a kan manyan hanyoyin zirga-zirga saboda yana rage rarar CPU da kiran bayanai.

    • 5

      Kyakkyawan sanyi, Carlton! Don haka yana da matukar rarraba hanyar sadarwa kamar Akamai. Ban gane suna da wannan ba! Zan iya cin nasara bayan ganin wasu farashin.

      Na taɓa yin ɓoye tare da wp da aka kunna a baya, amma ina da wasu abubuwa masu ƙarfi don haka da gaske nayi gwagwarmaya da shi tunda wani lokacin zai ɓoye abun ciki wanda a zahiri nake son ɗorawa lokaci-lokaci.

      • 6

        Douglas,

        Daga bayaninsu kamar sauti na Amazon yana yin wani abu daban, suna cewa:

        “Amazon CloudFront yana amfani da wurare masu ƙyama 14 a cikin manyan kasuwanni a duniya. Takwas suna cikin Amurka (Ashburn, VA; Dallas / Fort Worth, TX; Los Angeles, CA; Miami, FL; Newark, NJ; Palo Alto, CA; Seattle, WA; St. Louis, MO). Hudu suna cikin Turai (Amsterdam; Dublin; Frankfurt; London). Biyu suna Asiya (Hong Kong, Tokyo). ”

        Amfani da su ta hanyar amfani da musayar intanet don haɓaka kusancin su da mai amfani inda kamar CDN kamar Akamai suna da sabobin da ke kusa da mai amfani da su galibi a cikin hanyar ISP.

        Hanyar Amazons tana da rahusa sosai kuma mafi inganci Akamai.

        Rogerio - http://www.itjuju.com/

  4. 7

    Ba zan ce yana da wahala a “sami aikin kirki tare da CMS kamar WordPress ba.”

    Duk yana cikin yadda kuke saita kayan aikin ku ko yadda kuke karɓar CMS ɗin ku.
    Hanyar da aka sanya lambar CMS kanta shima zai iya taka rawa cikin aikin sa kamar yadda Carlton ya nuna tare da amfani da wp-supercache plugin.

    Zai fi kyau idan aikin wp-supercache plugin an gina shi zuwa wordpress daga farko - amma hakan na buƙatar sake rubuta ƙarshen ƙarshen. Wanne ne menene safiya.org aikata.

    Kashe ɗaukar abun tsaye a tsaye zuwa wani abu kamar S3 hanya ce mai kyau don sauke aiki da aikawa daga babban sabar. Hanya ce mai sauƙi kuma mai sauƙi ta dannawa cikin kayan Amazons don ɗaukar nauyi amma da zarar kun isa bakin ƙofa, Amazon zai fara yin tsada kuma zai zama mai rahusa a yi shi a cikin gida kuma ku tafi tare da CDN.

    Rogerio - http://www.itjuju.com/

    Zab
    Na jima ina tunanin wannan yanayin, idan mutane 100 kawai suka taru kuma suka ba da gudummawa kowane wata farashin sabar mai kyau wacce za su saba biya za su iya ginawa / hada kayan more rayuwa wadanda zasu iya daukar kusan komai.

  5. 8

    $ 0.12 don kwanakin farko na sabis na S3. Shin za ku sake duba batun a cikin 'yan watanni kuma ku nuna wasu ƙididdigar zirga-zirga da farashin? Zai zama mai ban sha'awa ganin yadda farashin ya rabe ga baƙi na musamman da kan farashin talla ko wasu abubuwan shiga.

  6. 13
  7. 14

    Amazon S3 sabis ne mai ƙimar gaske. Ina cikin aikin hade shi a cikin CMS. Batun kawai da na ci karo da shi daga hangen nesa, ba batun sabis na Amazon ba, shine idan kuna son mai amfani da ku ya loda fayil ɗin kai tsaye zuwa S3 ta hanyar POST kuma kuna da nau'i mai yawa wanda ya ƙunshi rubutun da aka tsara don yankinku database, kana makale. Ko dai kuna buƙatar raba shi zuwa nau'i biyu, ko kuma gwada amfani da ajax don loda fayil ɗin da farko sannan a kan nasarar gabatar da bayanan a cikin gida.

    Idan kowa yana da mafita mafi kyau, ku kyauta ku sanar da ni: o)

    Koyaya, ajiyar kuɗi don karɓar manyan fayilolin zirga-zirga yana bada garantin ci gaban wannan tsarin.

    Grant

    Tsarin Lissafin Matsa lamba

  8. 15

    Hi,

    Babban rubutawa. Na shiga ciki kamar yadda kuke bayani, amma a cikin rukunin gudanarwa na inda nake loda hotuna, ban ga maɓallin S3 ba. Na lura cewa hotuna na, lokacin da aka ɗora hoto akai-akai sun ƙare akan Amazon, shin wannan yana nufin yanzu zan iya kwafa duk hotunan da nake da su kuma share waɗanda ke kan sabar?

    Kuma shin ina bukatan gyarawa daga inda hotunan na suka fito ko kuma kayan aikin suna yin hakan?

  9. 16

    Barka dai Scott,

    Ya kamata ku ga ɗan ƙaramin wurin adana bayanai na dama zuwa dama na gunkinku na yau da kullun. Wannan shine gunkin da zai tashi taga Amazon. Na matsar da dukkan abubuwan wp / abubuwan da aka loda zuwa Amazon kuma na tabbata ina da hanya ɗaya… kawai bambancin shine subdomain. Sun kasance a http://www... kuma yanzu sunkai ga images.marketingtechblog.com. Bayan na kwafe duk hotunan zuwa Amazon, sai nayi amfani da PHPMyAdmin kuma nayi bincike kuma na maye gurbin src = ”http://martech.zone kuma na maye gurbinsa da src =” images.marketingtechblog.com. (https://martech.zone/wordpress/mysql-search-replace/)

    Fata cewa taimaka! Babu sumul, amma yana aiki.

    Doug

  10. 17

    Hey Douglas, na gode da hakan, Na sabunta DB don haka duk hotunan suna nuna hotuna., Amma na ga wasu manyan yatsu (idan aka duba ta shafin shafin) yana nuna alamar har yanzu a www.

    Anan ga rukunin yanar gizon (www.gamefreaks.co.nz) - a, alos yana da babban mahimman batun ƙwaƙwalwar ajiya don shafin farko, kawai ya fara ne da zarar mun canza wurin tallatawa, saboda haka yanzu nake kallon sauke wasu matsin lamba zuwa S3. 😎

  11. 18
  12. 19

    Sannu Scott, kayan aikin S3 suna ba da hanyar kansu kai tsaye zuwa Amazon, don haka BA a adana fayil ɗin a cikin gida.

  13. 20
    • 21

      Ya dace da sabon sigar, amma ni gaskiya ba na son yadda yake aiki - dole ne ka matsa ka loda dukkan hotunan zuwa S3 tare da wani tsari na daban. Da gaske muna iya haɓaka haɗin CDN mai ƙarfi (Sadarwar Sadarwa) tare da WP wanda ke aiki tare maimakon neman tsari daban.

  14. 22
  15. 23

    Shin kun san ko wannan yana aiki tare da "Buckets na waje" kuma? Ina so in saita wannan don blog na abokina kuma in bar shi yayi amfani da guga a cikin asusun AWS na (Na riga na ƙirƙiri masa asusun mai amfani kuma na bashi damar zuwa ɗaya daga cikin guga na ta amfani da kayan aikin Amazon IAM).

  16. 24
  17. 25
    • 26

      Celia, je gidan AWS http://aws.amazon.com/ kuma a ƙarƙashin “My Account / Console” ya faɗi ƙasa, zaɓi “Bayanan Tsaro.” Shiga ciki idan kuna bukata. Daga can, gungura ƙasa zuwa Bayanan Shaida kuma zaku ga ID Key ɗinku na Lissafi. Kwafa ɗayan waɗancan don maɓallin ID don wannan plugin ɗin, sannan danna maɓallin "Nuna" don ganin Maɓallin Shigar Sirrin da ya fi tsayi. Kwafa hakan ka liƙa shi a cikin saitunan abubuwan talla ma. Ya kamata ku kasance duk saita bayan wannan!

  18. 27
  19. 28

Me kuke tunani?

Wannan shafin yana amfani da Akismet don rage spam. Koyi yadda aka sarrafa bayanan bayaninka.