Optimized WordPress Installation Package - Remove Google Fonts

Publish: 2014-09-27 | Modify: 2014-09-27

Recently, some friends have been experiencing the same issue with their WordPress websites being very slow, even with the same host and program. When it's confirmed that the issue is not with the host, the most likely cause is that the WordPress program defaults to loading Google fonts, which slows down the installation process and the backend.

To solve this problem, I have removed the Google fonts from the official WordPress installation package and re-compressed it. Users who need it can directly use the optimized installation package without the need for additional plugins or code to remove the Google fonts (excluding theme-specific font calls).

Optimization content:

  • Removed Google fonts from the source of WordPress
  • Removed Google fonts from the default theme, twentyfourteen
  • Deleted the bundled themes, twentythirteen and twentytwelve
  • Added TangStyle V1.0.9 optimized theme

This package only removes the default Google fonts, and no other modifications have been made. If you're not confident, you can download the official package and manually remove them. The method is as follows:

  1. Open the wp-includes/script-loader.php file and find the code on line 603. Delete or comment it out, and WordPress backend will no longer call Google fonts. See screenshot below: google_fonts

By doing this, the backend will no longer be slow. However, the default theme, twentyfourteen, will still call fonts from Google, and the frontend will also be slow. The solution is to switch to another theme or manually delete the function twentyfourteen_font_url() that calls Google fonts from the wp-content/themes/twentyfourteen/functions.php file.

Download link: WordPress Optimization Package


Comments