PHP AMP Plugin - Download & Instruksi

Kanthi plugin AMP kanggo PHP sampeyan bisa kanthi gampang, kanthi otomatis, nggawe kaca Google AMP kanggo situs web sampeyan.

Optimalake situs web PHP kanggo piranti seluler lan Indeks Pertama Ponsel Google tanpa kudu program versi AMPHTML dhewe kanggo saben kaca!

Tes metu: Instal. Aktifake. siyap!


Pariwara

Instal plugin AMP PHP


description

Tips sadurunge miwiti nginstal plug-in PHP-AMP: Kanggo sawetara solusi CMS, amp-cloud.de nawakake plug-in Google AMP khusus sing luwih gampang dipasang lan dikelola! - Minangka alternatif "plug-in AMP kanggo PHP" , salah sawijining plug-in Google AMP ing ngisor iki bisa dadi minat sampeyan:


Langkah-1: Download "Plugin AMP kanggo PHP"

Download versi "AMP kanggo Plugin PHP" saiki minangka file ZIP saka link download ing ngisor iki. - File ZIP ngemot folder sing diarani "amp" sing ngemot kabeh file sing dibutuhake kanggo nginstal lan nggunakake plug-in AMP.


Langkah-2: Ekstrak "AMP kanggo PHP Plugin" -ZIP-file

Unzip / ekstrak file ZIP sing diunduh.

  • Sawise mbongkar / ngekstrak saiki sampeyan kudu duwe "folder" kanthi jeneng "/ amp /" ing ngendi file plug-in PHP-AMP dumunung.

Langkah-3: Simpen file plugin PHP ing server web

Upload folder sing ora zip kanthi jeneng "/ amp /" menyang direktori root server web sampeyan supaya folder kasebut bisa ditemokake ing situs web sampeyan kanthi URL ing ngisor iki:

  • www.DeineDomain.de/amp/

Kanggo nyoba manawa folder kasebut disimpen kanthi bener ing server web sampeyan, cukup klik URL ing ngisor iki - Yen instalasi bener, sampeyan kudu ndeleng pesen sing ngandhani manawa situs web sampeyan nggunakake plug-in AMP saka amp-cloud.de, yen plugin ora diinstal kanthi bener lan sampeyan kudu mbukak langkah-langkah ing ndhuwur maneh:

  • www.DeineDomain.de/amp/amp.php
    (Mesthine sampeyan kudu ngganti www.yourdomain.de karo alamat situs web sampeyan)

Langkah-4: Lebokake tag AMPHTML!

Pungkasan, kalebu nyurung saben pangkalan, sing pengin diwenehake kanggo versi AMP, nggunakake salah sawijining varian ing ngisor iki <link rel = "amphtml"> - dina ing bagean <head> basis sing cocog.

  • Versi 1:

    <link rel = "amphtml" href = "http: // www.DeineDomain.de /amp/amp.php?url= IhrArtikelURL " />
    • Ganti bagean "http: //" karo "https: //" yen sampeyan nggunakake HTTPS ing situs web sampeyan
    • Ganti bagean "www.yourdomain.de" karo domain situs web sampeyan
    • Ganti bagean "URL Artikel Sampeyan" karo URL sing dienkode UTF8 saka subkaca masing-masing sing kalebu tag AMPHTML (kalebu. "Http: //" utawa "https: //")

      Kanggo ngodhe URL kanthi bener, sampeyan bisa nggunakake encoder URL online gratis ing ngisor iki, contone: https://www.url-encode-online.rocks/

      Contone URL sing dienkode UTF-8:
      https% 3A% 2F% 2Fwww.DeineDomain.de% 2FDeinPfad% 2FDeineDatei.php% 3Fparameter% 3DS% C3% BC% C3% 9F% 26sprache% 3DDE

      Contone URL sing diuripake UTF-8:
      https://www.DeineDomain.de/DeinPfad/DeineDatei.php?parameter=Süß&sprache=DE

  • Varian 2:

    <link rel="amphtml" href=" http:// ".$_SERVER['HTTP_HOST']."/amp/amp.php?url=".urlencode(" http:// ".$_SERVER['HTTP_HOST" '].$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']."")."" />
    • Yen sampeyan nggunakake HTTPS ing situs web, ganti rong bagean "http: //" karo "https: //"

Contone kode PHP PHP


code
<?php echo " <!DOCTYPE html> <html> <head> <title> Judhul meta sampeyan ... </title> <link rel="amphtml" href="https://".$_SERVER['HTTP_HOST']."/amp/amp.php?url=".urlencode("https://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']."")."" /> </head> <body> Kode sumber awak sampeyan ... </body> </html> ;" ?>

Napa nggunakake plugin AMP PHP?


power

Plugin AMP kanggo PHP resmi saka amp-cloud.de ngaktifake Kaca Mobile Akselerasi (AMP) ing situs web PHP sampeyan dhewe, langsung ing sangisore host sampeyan dhewe, kaya sing disaranake pedoman host AMP Google!


Pariwara