Today, Naiba was importing
Astra Themedemo data on a domestic server, but due to network issues, multiple attempts failed. Normally, after setting up a domestic server, we can use plugins like 'kill 429' or 'wp china yes' to speed up access to wordpress.org, enabling plugin installation and updates. However, for specific plugin and theme data—which are not fetched from the WordPress official site but from the plugin and theme's own websites—domestic servers often experience poor network conditions, leading to installation and import failures.
There are two solutions:- Debug the website data on a foreign server, then back up and restore the data to the domestic server;
- Set up a proxy server for WordPress on the domestic server to accelerate requests to foreign websites.
Naiba uses the second method here, employing v2raψ as a proxy for access.
The specific steps are as follows:1. Purchase a foreign server with decent access speed from the domestic server.
Foreign ServerYou can ping the foreign server from your own server to check the ping value; generally, lines exceeding 250ms may feel laggy. 2. Install v2raψ on the server.
bash <(curl -L -s https://install.direct/go.sh)
After installation, open the configuration file at /etc/v2raψ/config.json and note the following:
3. Install v2raψ on the domestic server using the same method as above, though downloads may be slow; refer to this article
Accelerating Github. 4. Modify the configuration file /etc/v2raψ/config.json by deleting the default content, pasting the content below, and then editing the parts explained in Chinese.
{
"log": {
"loglevel": "warning"
},
"inbound": {
"listen": "127.0.0.1",
"port": 8080,
"protocol": "http",
"settings": {
"allowTransparent": false,
"userLevel": 1
}
},
"outbound": {
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "168.168.168.168这里改成代理网站IP",
"port": 8888这里改成代理网站端口,
"users": [
{
"id": "c503b067-e78f-b037-1ac7-7b369103ec9f这里改成代理网站的uuid",
"level": 1,
"alterId": 64
}
]
}
]
}
},
"outboundDetour": [
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"port": "54-79",
"outboundTag": "direct"
},
{
"type": "field",
"port": "81-442",
"outboundTag": "direct"
},
{
"type": "field",
"port": "444-65535",
"outboundTag": "direct"
},
{
"type": "field",
"domain": [
"gc.kis.scr.kaspersky-labs.com"
],
"outboundTag": "direct"
},
{
"type": "chinasites",
"outboundTag": "direct"
},
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "direct"
},
{
"type": "chinaip",
"outboundTag": "direct"
}
]
}
}
}After configuration, restart the v2raψ service with systemctl restart; if unsure, simply reboot the server. 5. Edit the WordPress configuration file to add proxy settings.
/** 代理 */
define('WP_PROXY_HOST', '127.0.0.1');
define('WP_PROXY_PORT', '8080');
define('WP_PROXY_BYPASS_HOSTS', 'localhost, *.wordpress.org');Add the foreign URLs that WordPress needs to access to the third line above, then save and overwrite the file. Then, test the effect in the WordPress Admin Dashboard; previously inaccessible plugin resources should now load normally. Reference: https://s5s5.me/3721
Comments are closed
The comment function for this article is closed. If you have any questions, please feel free to contact us through other channels.