🚀 Is building a website too difficult? Let me guide you step by step—Learn about the 「Naibabiji WordPress Website Building Coaching Service」 →

Solutions for WordPress Theme Demo Data Import Failure on Domestic Servers

Today, while Naiba was importingAstra ThemeDemo data on a domestic server, it failed many times due to network issues. Normally, after installing on a domestic server, using plugins like kill 429 or wp china yes can speed up access to wordpress.org, allowing plugin installation and updates. However, for specific plugin and theme data, which are not requested from WordPress.org 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 methods to solve this:
  1. Debug the website data on a foreign server, then back up and restore the data to the domestic server;
  2. 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 method is as follows:1. Purchase aforeign serverYou can ping foreign servers from your own server to check the ping value. Generally, lines with ping values exceeding 250ms may feel laggy to use. 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 for editing, and note down the following:
  • port value
  • uuid value
3. Install v2raψ on the domestic server. The method is the same as the code above, but the download might be slow. You can refer to this articleSpeed up Github. 4. Modify the configuration file /etc/v2raψ/config.json. Delete the default content of the configuration file, paste the content below, and then modify 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 you don't know how, simply reboot the server. 5. Edit the WordPress configuration file to add the proxy configuration information.
/** 代理 */
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 position of the third line above. After saving, upload and overwrite the file. Then, go to the WordPress Admin Dashboard to test the results. Previously inaccessible plugin resources should now load normally. Reference: https://s5s5.me/3721

🚀 Still feeling confused after reading the tutorial? Let me guide you step-by-step instead.

「Naibabiji WordPress Website Building Coaching」 — From selecting a domain and purchasing hosting to installing themes and publishing posts, I「ll guide you through every step, helping you avoid detours and reach your goals directly.

👉 Learn about Website Building Coaching Service
🔒

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.

×
二维码

Scan to Follow