[fix] Sendmail Can’t Send Mail!

If your Centos server/VPS can’t send mails, please read this post.

  1. Reinstall the sendmail
    yum install sendmail
  2. Restart php-fpm
    /etc/init.d/php-fpm restart
  3. Test sendmail work properly or not
    /etc/init.d/sendmail status
    Commands you may use
    /etc/init.d/sendmail start
    /etc/init.d/sendmail stop
    /etc/init.d/sendmail restart
  4. edit php.ini
    vi /usr/local/php/etc/php.ini
    You may find the default code:
    ;sendmail_path =
    Press “i” to edit the code
    sendmail_path = /usr/sbin/sendmail -t -i
    Press “ESC” then put “:wq” quit and save.
  5. Restart php-fpm/etc/init.d/php-fpm restart


Fix! WordPress “Could not create directory”

Sometimes when we install the WordPress themes or WordPress plugins we may failed, just because there are some small problems with the server settings. If you meet the following error, just read this post to find the solutions.

Downloading install package from http://downloads.wordpress.org/plugin/zip.
Unpacking the package.
Installing the plugin.
Could not create directory.
Plugin Install Failed.

There are two main reasons, the folder write permission and the folder with different owner.

  1. Folder Permission

    Change permissions on the /wp-content directory to 0775

    if not work Change permissions on the /wp-content directory to 0777.

    uploading the plugin manually via FTP

  2. Ownership

    If you using Linux VPS or Hosting, you can change the folders owner.
    Usually, change the root or some other owners to www

    Use putty to login your site, change the ownership.

    Command: chown [-cfhvR] [–help] [–version] user[:group] file…

    change the wp-content‘s owner from root to www

    chown -R www:root wp-content

Wordpress Could not create directory dobeweb
WordPress Could not create directory


By the way, if you want to install the theme or plugins automatically,  you can add the folowing code in the wp-config.php

define('FS_METHOD', 'direct');

Just like this:

wordpress install theme plugin automatically dobewebThen save!

There is no need to add your FTP info.

wordpress ftp username password

WordPress Responsive Captions & Images

More and more people using mobile and pad to surfer the internet these days, for most of the websites, 60-80% visitors using mobile now, so make your site responsive is accessory.

For some of the “old” WordPress themes, they’re responsive, but the images you insert with captions don’t behave responsive, I have found some solutions, but most of them are not easy to use, here is a simple way to make your images with captions responsive.

WordPress responsive images with captions

What you do is just change some of the file style.css

Make the caption responsive:
#content .wp-caption {
background: 1px #F9F9F9;
border: 1px solid #DDD;
box-shadow: 2px 2px 3px #888;
-moz-box-shadow: 2px 2px 3px #888;
-webkit-box-shadow: 2px 2px 3px #888;
line-height: 18px;
margin-bottom: 20px;
padding: 4px;
text-align: center;
color: #333;

Make the images in the post responsive:

.entry-content img {max-width: 96%; height:auto;}


 WordPress image captions responsive
WordPress responsive image captions

WordPress – Remove Malware Backdoor Code

Removing a string in a PHP file with Start and End
I found my WordPress sites were infected by an exploit and and I’m trying to clean the codes, all php files on the server were added a line like this:

at the beginning of it :

<?php if(!isset($GLOBALS[“\x61\156\x75\156\x61″]))  and ends with -1; ?>.
These codes were added at the begin of all the php files.

Yes, your website was hacked! I searched for a long time, and finally find the solution!

You can follow this guide. You can copy the code and run on your server.

If the code can’t work, and get the error like this:

/bin/sh^M: bad interpreter: No such file or directory

you need to change the code from DOS to UNIX with the tool UltraEdit


Or you can download the code here directly. remove_malware

Finally, I removed all the hacked codes.

In order to make sure you have removed all the codes, you can use this tool – Web Shell Detector.

Web Shell Detector – is a php script that helps you find and identify php/cgi(perl)/asp/aspx shells. Web Shell Detector has a “web shells” signature database that helps to identify “web shell” up to 99%.

You can download it here – Web Shell Detector.

Store WordPress Uploaded Images With Different Hostnames 

Browse your WordPress based website with a lot images faster~!


Parallelize image downloads across hostnames

Parallelize allows automatically parallelizing resources across multiple hostnames, speeding page load.

While browsers can handle up to 60 http requests simultaneously, only 2-4 simultaneous requests can be handled from the same hostname. This can potentially slow down page loads on your site.

The solution Recommended by Google is parallizing resources across 2-5 hostnames on sites serving 10 or more static resources.

Parallelize allows automatically parallelizing WordPress attachement files (images or any files uploaded with the wordpress media features) across multiple hostnames, speeding page load. To assist caching, resources will always load from the same hostname.

This plugin is distributed as-is, no warranty whatsoever.

You can download this cool WordPress plugin here.

30 Best Free Responsive WordPress Themes 2015

More and more people using smartphones these days, a lot people using smartphones visiting websites instead of the desktop PCs. We have more than 60% of our visitors are coming from high-end smartphones, so it is very important to use responsive layouts for your sites.

If you’re looking for free responsive WordPress themes, you’re at the right place, we have collecetged the latest new free wordpress themes here, meaning you can download, install and activate them and quickly and easily meet the needs of your mobile users.

Free Responsive WordPress Theme: Luminus



Luminus is a retina-ready and simple theme that is ideal for a portfolio site.

It features extensive theme options so you can customize it to suit your needs and also comes with three page templates and a drag and drop builder. Continue reading 30 Best Free Responsive WordPress Themes 2015

Solution: WordPress Can’t Update – Can’t Copy Files

Some of you may got the WordPress update errors, just like “failed to open stream: Permission denied in” “Could not copy files”, The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions. Installation Failed. etc.

Wordpress Update Error Can't Copy Files
WordPress Update Error Can’t Copy Files

Usually, you can set the file permission to 644, if this can’t solve your problem, please do the following:

login via SSH,

using the command:

chown -R www *

Please change the ownership of your wordpress site’s file, for example,

your wordpress script is under /home/www/yoursitefolder

you can do this:

chown -R www * /home/www/yoursitefolder

then you can update your WordPress script successfully!


Useful SEO Plugin: Add “nofollow” to All Your External Links

When you credit others materials links, you may want to add “nofollow” to the external links, you can do this manually, but if there are 100 links in one page, and you want to add the `rel=nofollow` and `target=_blank` to all your external links in older posts, how can you handle this?

Here is the solution!

WordPress SEO Plugin: “Nofollow for external link”

WordPress seo plugin

WordPress seo plugin

This cool plugin will automatically inserts `rel=nofollow` and `target=_blank` to all the external links into your website posts or pages.

Just simple, if you use this plugins, rel=nofollow and target=_blank will be insert automatically, for all the external links of your website posts or pages.


  • Add rel=nofollow for all the external link of your blog/website posts/pages.
  • Add target=_blank for all the external link of your blog/website posts/pages.
  • This plugins will not add rel=nofollow and target=_blank any of the internal link of your blog/website posts/pages.
  • If you already added rel=dofollow to any post manually, this plugins will not add rel=nofollow for that post.
  • If you already added target=_blank to any post manually, this plugins will not add target=_blank for that post.

Download it here.