[WordPress] 外掛分享: WP-ngrok

首頁外掛目錄 › WP-ngrok
WordPress 外掛 WP-ngrok 的封面圖片
30+
安裝啟用
★★★☆☆
3/5 分(1 則評價)
1201 天前
最後更新
問題解決
WordPress 5.0+ PHP 8.0+ v1.1.2 上架:2020-12-02

內容簡介

本外掛能夠將運行在您的本機機器上的 WordPress 本地網頁服務暴露到網際網路上。Ngrok 能夠幫助您實現此功能。
此外掛透過掛載頁面創建的開始和結尾,並將其捕獲到輸出緩衝區中。接著,它將使用資料庫中的 URL 進行 str_replace,會在發送回關閉鈎子之前刪除它。這意味著,我可以共享 ngrok URL 的 HTTP 或 HTTPS 版本。

使用方法
第一步:安裝 ngrok

在此下載並安裝 ngrok https://ngrok.com/download

第二步:安裝 WP-NGROK

將 wp-ngrok.zip 文件夾上傳到 /wp-content/plugins/ 目錄
在 WordPress 的「外掛」菜單中啟用此外掛

在您的終端中運行以下命令:

~/ngrok http -host-header=localdomain.test 8888

第三步:創建 localtunnel

通過傳遞我們在本地使用的網站主機名和端口號,這將指引流量到我們的本地網站。這對於我們自己創建它,或者使用類似 MAMP Pro 之類的工具進行設置都是有效的。

~/ngrok http -host-header=sitename.localhost 8888

一旦 ngrok 啟用並運行,就會顯示如下的信息:

會話狀態 在線
帳戶 Theme.id (計劃:專業版)
版本 2.3.35
地區 美國(us)
Web 介面 http://127.0.0.1:4040
轉發 http://yourapp.ngrok.io -> http://localhost:8888
轉發 https://yourapp.ngrok.io -> http://localhost:8888

最低要求

WordPress 版本必須為 5.0 或更高
PHP 版本必須為 5.6 或更高
MySQL 版本必須為 5.0 或更高

我們推薦您的主機支援:

PHP 版本必須為 7.0 或更高
MySQL 版本必須為 5.6 或更高
WordPress 記憶體限制必須為 64 MB 或更大(最好是 128 MB 或更高)

請在 WordPress 支援中發問

如有關於此外掛的問題,請隨時在 WordPress 支援中提問

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.1.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「WP-ngrok」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Expose a WordPress local web server to the internet ngrok allows you to expose a web server running on your local machine to the internet.
This plugin works by hooking to the start and end of the page creation and capturing it into an output buffer, it then uses the URL from the database for a str_replace, stripping it out before sending back out to the shutdown hook. This means that I can share either the HTTP or HTTPS versions of the ngrok URLs.
How To Use
Step One: Install ngrok
Download and install ngrok here https://ngrok.com/download
Step Two: Install WP-NGROK

Upload wp-ngrok.zip folder to the /wp-content/plugins/ directory
Activate the plugin through the ‘Plugins’ menu in WordPress

run command in your terminal
~/ngrok http -host-header=localdomain.test 8888
Step Three: Creating the localtunnel
Send through the host name of the site that we use locally as well as the port number and this will then direct the traffic to my local site. This works whether we had created it, or using something like MAMP Pro to set this up for me.
~/ngrok http -host-header=sitename.localhost 8888

Once ngrok is up and running I will be presented with the display that you can see below
Session Status online
Account Theme.id (Plan: Pro)
Version 2.3.35
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding http://yourapp.ngrok.io -> http://localhost:8888
Forwarding https://yourapp.ngrok.io -> http://localhost:8888

Minimum Requirements
WordPress 5.0 or greater
PHP version 5.6 or greater
MySQL version 5.0 or greater
We recommend your host supports:
PHP version 7.0 or greater
MySQL version 5.6 or greater
WordPress Memory limit of 64 MB or greater (128 MB or higher is preferred)
Please ask in WordPress Support
Please to ask about this plugin

延伸相關外掛

文章
Filter
Apply Filters
Mastodon