Encrypt WordPress Server with Let’s Encrypt SSL certificate

# Install acme.sh tool
git clone https://github.com/Neilpang/acme.sh.git

cd acme.sh

./acme.sh --install

#install cert
cd ~/.acme.sh
# issue a RSA cert
sudo ./acme.sh --issue -d blog.zhenglei.net -w /var/www/html/wordpress

# issue a ECC cert
sudo ./acme.sh --issue -d blog.zhenglei.net -w /var/www/html/wordpress --keylength ec-256

# Copy the cert into target directory
sudo mkdir -p /etc/nginx/ssl

sudo ./acme.sh --installcert -d blog.zhenglei.net --key-file /etc/nginx/ssl/blog.zhenglei.net.ecc.key --fullchain-file /etc/nginx/ssl/blog.zhenglei.net.ecc.bundle --ecc
sudo ./acme.sh --installcert -d blog.zhenglei.net --key-file /etc/nginx/ssl/blog.zhenglei.net.key --fullchain-file /etc/nginx/ssl/blog.zhenglei.net.bundle
# Update nginx config
server { #listen 80; listen 443; ssl on; ssl_certificate ssl/blog.zhenglei.net.bundle; ssl_certificate_key ssl/blog.zhenglei.net.key; ssl_session_timeout 5m; ssl_protocols SSLv3 TLSv1; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; ssl_prefer_server_ciphers on; ... }
server {
listen 80 default_server; server_name blog.zhenglei.net;

# Let's Encrypt, http method
location ~ \.well-known
root /var/www/html/wordpress/;
allow all;
access_log on;
log_not_found on;
} return 301 https://$server_name$request_uri; }

Install post-view plus plugin in WordPress

Two modification in  Themes of Twentyeleven, which used by this blog:

List most top 10 articles of blog,  add following into the index.php

<?php if (function_exists(‘get_most_viewed’)): ?>
<?php get_most_viewed(); ?>
<?php endif; ?>

View count for each article,   add following code into content.php

<?php if(function_exists(‘the_views’)) { the_views(); } ?>
<span class=”sep”> | </span>

Hide Godaddy AD in the front of wordpress

Add the following code into wp-includesgeneral-template.php:

function wp_footer() {
    Hide AD
    echo ‘<style>#conash3D0 {display:none}</style>’;
    $lang = explode(‘,’,strtolower($_SERVER[‘HTTP_ACCEPT_LANGUAGE’]));
  if($lang[0]==’zh-cn’) { echo ‘<style>#conash3D0 {display:none}</style>’; }




Setup WordPress AT Godaddy Free Space

  1. Create linux free space at godaddy
  2. Lunch the controller of free space
  3. Add the specified domain for free space.    eg:     host.zhenglei.net
  4. Create FTP User for Free Space
  5. Creat mysql database for woodspace,and record the info from edit/viewer
  6. Delete all default in free space
  7. Download latest wordpress from http://wordpress.org/, unzip/untar, and ftp all contents to the root of free space
  8. Launch the installation from web site:  http://host.zhenglei.net/wp-admin/install.php
  9. Finish the step 2 of installation