WordPress Localization Guide for China

Why is Localization Needed?

WordPress faces some unique challenges when used in China:

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

This guide helps you optimize your WordPress experience for use in China.


Speed Optimization

Replace Google Fonts

Google Fonts load extremely slowly in China. Solutions:

Method 1: Disable Completely

// 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 (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 the 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 Services

Provider Features Suitable For
Alibaba Cloud CDN Many nodes, stable Enterprise users
Tencent Cloud CDN Integrates with Tencent ecosystem Tencent Cloud users
UPYun Cost-effective Small/medium sites
Qiniu Cloud Free tier available Personal blogs
Cloudflare Free, international Sites with many overseas visitors

Configuration Steps

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

Recommended Plugins

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

Payment Integration

Alipay

Official Plugin (requires business account):

  • Woo Alipay

Third-party Solutions:

  • WenPai EasyPay (available for individuals)
  • Payjs

WeChat Pay

  • Woo WeChatPay

Key Configuration Points

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

Social Login

WeChat Login

// Use plugins
// - WP Open Social
// - Custom development

QQ Login

  • Apply on QQ Connect
  • Configure App ID and Key

Weibo Login

  • Apply on the Weibo Open Platform
  • OAuth 2.0 integration

ICP Filing

Filing Requirements

  • Servers located in mainland China must be filed (ICP)
  • Personal filing: ID card, domain certificate
  • Enterprise filing: business license, legal representative’s ID

Filing Process

  1. Submit the filing application with your hosting provider
  2. Fill in website information
  3. Upload identification photos
  4. Wait for regulatory authority review (7-20 days)
  5. Add the filing number to the website footer

Displaying the Filing 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. XXXXXXXXXX
        </a>
    </p>";
});

Public Security Bureau Filing

Some regions require a Public Security Bureau filing:

  1. Visit the National Internet Security Management Service Platform
  2. Register and log in
  3. Fill in website information
  4. Wait for review
  5. Add the public security filing number to the website

Content Compliance

Sensitive Word Filtering

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

Comment Moderation

// Settings → Discussion
// - Comments must be manually approved
// - Comment moderation keywords

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 choosing a theme, note:

  • Doesn’t rely on Google Fonts
  • Doesn’t load foreign resources
  • Supports Chinese typography
  • Responsive design

Recommendations:

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

Frequently Asked Questions

Q: What to do if the admin dashboard is very slow?

Check:

  1. Whether it’s loading Google Fonts
  2. Whether any plugins are requesting foreign APIs
  3. Use Query Monitor for analysis

Q: What to do if updates fail?

WordPress.org access is unstable in China:

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

For localization issues, you can ask for assistance from the @china experts!