WordPress Localization Guide for China

Why Localization Is Necessary

Using WordPress in China presents several unique challenges:

  • Slow loading of overseas resources
  • Certain services are blocked
  • Different requirements for payment and social integrations
  • Regulatory compliance (e.g., ICP filing)

This guide helps you optimize the WordPress experience in China.


Speed Optimization

Replace Google Fonts

Google Fonts load extremely slowly within China. Solutions:

Method 1: Completely Disable

// functions.php
add_filter("style_loader_src", function($src) {
    if (strpos($src, "fonts.googleapis.com") !== false) {
        return "";
    }
    return $src;
}, 10, 1);

Method 2: Use a Domestic Mirror

add_filter("style_loader_src", function($src) {
    return str_replace("fonts.googleapis.com", "fonts.loli.net", $src);
}, 10, 1);

Method 3: Use a Plugin

  • Disable Google Fonts
  • SUSPENDED Google Fonts

Replace Gravatar Avatars

// Use Cravatar (a domestic service)
add_filter("get_avatar_url", function($url) {
    return str_replace(
        ["gravatar.com", "secure.gravatar.com"],
        "cravatar.com",
        $url
    );
});

Or use plugins:

  • WP Avatar
  • Simple Local Avatars

Replace jQuery Source

add_action("wp_enqueue_scripts", function() {
    if (!is_admin()) {
        wp_deregister_script("jquery");
        wp_register_script("jquery", 
            "https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js",
            [], "3.6.0", true
        );
        wp_enqueue_script("jquery");
    }
});

Domestic CDN Configuration

Recommended CDN Providers

Provider Features Best For
Alibaba Cloud CDN Extensive node coverage, high stability Enterprise users
Tencent Cloud CDN Seamless integration with Tencent ecosystem Tencent Cloud users
UpYun High cost-performance ratio Small-to-medium websites
Qiniu Cloud Generous free tier Personal blogs
Cloudflare Free, globally distributed Sites with many international visitors

Setup Steps

  1. Register for a CDN service
  2. Add your accelerated domain name
  3. Configure CNAME DNS resolution
  4. Set your CDN domain in WordPress
  5. Configure caching rules

Plugins for CDN Integration

  • WP Super Cache + CDN extension
  • W3 Total Cache
  • WP Rocket

Payment Integration

Alipay

Official plugin (requires enterprise account):

  • Woo Alipay

Third-party solutions:

  • Wenpai Yifu (supports individual accounts)
  • Payjs

WeChat Pay

  • Woo WeChatPay

Key Configuration Steps

  1. Apply for a merchant account
  2. Configure API keys
  3. Set up callback URLs
  4. Test the payment flow

Social Login

WeChat Login

// Use a plugin
// - WP Open Social
// - Custom development

QQ Login

  • Apply via QQ Connect
  • Configure App ID and App Key

Weibo Login

  • Apply via Weibo Open Platform
  • Integrate OAuth 2.0

ICP Filing

Filing Requirements

  • Hosting servers located in mainland China require ICP filing
  • Individual filing: ID card, domain certificate
  • Enterprise filing: Business license, legal representative’s ID

Filing Process

  1. Submit the filing application through your hosting provider
  2. Fill in website information
  3. Upload ID photos and supporting documents
  4. Wait for provincial telecommunications administration review (7–20 days)
  5. Display the ICP filing number in your site footer

Displaying the ICP Number

// functions.php
add_action("wp_footer", function() {
    echo "<p style=\"text-align:center;\">
        <a href=\"https://beian.miit.gov.cn/\" target=\"_blank\">
            Jing ICP Bei No. XXXXXXXX
        </a>
    </p>";
});

Public Security Filing

Some regions require additional public security filing:

  1. Visit the National Internet Security Management Service Platform
  2. Register and log in
  3. Submit website information
  4. Wait for review
  5. Display the public security filing number on your website

Content Compliance

Sensitive Word Filtering

// Use plugins
// - WPICP
// - Custom sensitive word list

Comment Moderation

// Settings → Discussion
// - Comments must be manually approved
// - Keywords triggering comment moderation

Recommended Plugin Combinations

Speed Optimization

  • WP Super Cache / WP Rocket
  • ShortPixel (image compression)
  • Disable Google Fonts

Localization

  • Cravatar (avatars)
  • WPCY.COM (one-click optimization)

Security & Compliance

  • Wordfence
  • WP Content Filter

China-Friendly Themes

When selecting themes, consider:

  • No dependency on Google Fonts
  • No external requests to overseas resources
  • Support for Chinese typography
  • Responsive design

Recommended themes:

  • developer.developer.developer
  • developer.developer.developer
  • developer.developer.developer

Frequently Asked Questions

Q: Why is the admin dashboard so slow?

Check for:

  1. Loading of Google Fonts
  2. Plugins making outbound API calls to overseas services
  3. Use Query Monitor to diagnose performance bottlenecks

Q: Why do updates fail?

WordPress.org is unstable or inaccessible in China:

  • Use the WPCY.COM plugin
  • Manually download update packages
  • Switch to a domestic mirror source

For localization issues, tag @china experts for assistance!