WordPress pages load very slowly after Google is blocked

After Google is completely blocked in China since May 31, I’ve had problems loading my website. After some investigation I found out the problem lies in loading failure of Google Fonts. Since it takes a long time to fail, the page waits before it fails and display with the fallback styles.

To solve the problem, I crawled the font styles from Google and put it up on my server. Then I changed the WordPress theme to use the font style on the server. Everything seems to work perfectly after that.

Another option would be completely disable Google Font Styles. This can be easily done using the WP plugin “Disable Google Fonts”, if you’re using WP’s default twenty-* themes. In my case, I would have to comment out two lines in Mog Theem Functions file (functions.php). Since my theme relies on Google Fonts, instead of commenting out the lines, I changed these to lines to use the localized style file:

 

mod_wsgi and mod_xsendfile on OS X 10.9 Mavericks

Updated on Nov 4, 2013: The following tricks may still work, however I have found a much easier solution. Simply install Xcode command line developer tools and you should be able to compile source code without issues:

After upgrading my Mac from 10.8 to 10.9 Mavericks my apache stopped working, so I have to reinstall mod_wsgi and mod_xsendfile. However, tricks are needed to compile and install these mods successfully.

Upgrade Xcode

Upgrade Xcode in App Store. As mentioned by Valerie:

I had to manually upgrade Xcode (after Mavericks upgrade) from the App Store & agree to its license because ./configure hung forever until I did that.

mod_wsgi

For mod_wsgi installation, create a soft link to OSX10.9.xctoolchain:

Then run configure under mod_wsgi source code directory:

It will generate a Makefile similar as follows:

However, this Makefile is not correct and running ‘make’ the compiler will complain something like:

Prepend the following line to CPPFLAGS value:

Save the Makefile and it will look something like:

Then make && install:

Modify /etc/apache2/httpd.conf to enable mod_wsgi:

mod_xsendfile

Use the following command to compile and install mod_xsendfile:

Enabling HTTPS/SSL

After upgrading OS X the apache configuration was reset, but your original config is save to /etc/apache2/httpd.conf.pre-update. I need to enable SSL in httpd.conf again by uncommenting the following line:

Restart Apache and everything should work fine

首页上线

捣鼓了两三天,总算把自己这个域名的首页建好了,结束了长达四个月没有像样首页的状态。

首页用Joomla!系统管理,主要列出了我做过的项目和一些小玩意,目的只是为了展示自己,当然自己有几斤几两我是十分清楚的。所以请看过之后不必对我表示鄙视或者仰慕,但是如果有建设性的意见,我一定会欣然接受的。

Joomla!系统总体来说还是很不错的,容易上手,而且开源且支持扩展。目前来说易用性还有可改进的地方,但相信不久就会有相应的更新或者扩展来让它更加好用。

最近还在上瑞典语课,但这几天感觉没有什么进步,一直在复习以前学过的内容,而且课程组织的也没有上个月的好,甚至可以说是杂乱无章。我基本不知道现在在学习什么内容,比较痛苦的是现在词汇量还没有跟上,发音也没有系统的巩固。

中午在地铁站碰见上个月教我瑞典语的老太太,她上来第一句寒暄我就没有听懂。厚着脸皮说了句“Ursäkta?”老太太只好无奈的换成英文问候。

知不足而后进,所以这个周末我要好好补习一下,争取能有长足进展。