首先更新系統(tǒng)軟件包并安裝Apache、PHP和MySQL/MariaDB:
sudo apt update && sudo apt upgrade -y
sudo apt install apache2 php libapache2-mod-php -y
sudo apt install mysql-server php-mysql -y
安裝完成后通過瀏覽器訪問服務(wù)器IP地址,若顯示Apache默認(rèn)頁(yè)面則說(shuō)明環(huán)境配置成功。
創(chuàng)建WordPress專用數(shù)據(jù)庫(kù)并設(shè)置用戶權(quán)限:
sudo mysql -u root -p
CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
GRANT ALL ON wordpress.* TO 'wpuser'@'localhost' IDENTIFIED BY 'your_password';
完成配置后需執(zhí)行FLUSH PRIVILEGES;
刷新權(quán)限。
通過以下步驟完成核心程序部署:
cd /var/www/html
sudo wget https://cn.wordpress.org/latest.zip
sudo chown -R www-data:www-data wordpress
使用cpolar工具建立公網(wǎng)訪問通道:
curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash
cpolar http 80
通過上述步驟可在30分鐘內(nèi)完成WordPress的本地部署,配合內(nèi)網(wǎng)穿透技術(shù)能有效突破網(wǎng)絡(luò)環(huán)境限制。建議定期更新系統(tǒng)組件并配置SSL證書以提升網(wǎng)站安全性。
2025-03-12
廣州蘇營(yíng)貿(mào)易有限公司專注海外推廣十年,是谷歌推廣.Facebook廣告核心全球合作伙伴,我們精英化的技術(shù)團(tuán)隊(duì)為企業(yè)提供谷歌海外推廣+外貿(mào)網(wǎng)站建設(shè)+網(wǎng)站維護(hù)運(yùn)營(yíng)+Google SEO優(yōu)化+社交營(yíng)銷為您提供一站式海外營(yíng)銷服務(wù)。
We and selected third parties use cookies or similar technologies for technical purposes and, with your consent, for other purposes as specified in the cookie policy.
You can consent to the use of such technologies by closing this notice, by interacting with any link or button outside of this notice or by continuing to browse otherwise.