WordPress Visual Editor Broken

It appears a recent upgrade to WordPress 3.5 is causing the Visual or Text Editor to break. I found errors with the JavaScript within post.php and tinymce. The console in Chrome shows the errors below:




Installing the plugin use-google-libraries seems to resolve the issue.



Limit FTP Access to certain IPs

For whatever reason, be it security or otherwise, if you wish to limit FTP access to a certain IP, the IP tables rule below should do the trick:

iptables -A INPUT -s ! x.x.x.x -p tcp --dport 21 -j DROP

Replace x.x.x.x with the IP Address. The rule simply means, if IP is not x.x.x.x do drop the connection to port 21

You can do the same for other ports say SSH

iptables -A INPUT -s ! x.x.x.x -p tcp --dport 22 -j DROP

For services, you can also look into using /etc/host.allow, For instance to deny access to WHM.

whostmgrd: : allow

whostmgrd: ALL : deny





The uploaded file could not be moved

If you are experiencing issues uploading files with the Media uploader in WordPress, the upload may be failing due to one of the following:

  1. Uploaded file is too large- By default the upload limit for WordPress is controlled by the upload_max_filesize/post_max_size limits in your php.ini file. If the file you are trying to upload is bigger than those limits, the upload will fail. You can increase those limits to increase the upload limit for WordPress.
  2. Upload path for WordPress is incorrect or unwritable – The default upload directory for WordPress is wp-content/uploads. If the directory is incorrect or it is unwritable you will be an error similar to the one in the screenshot below:
    To correct the upload path, navigate to Settings >> Media from your WordPress dashboard for the “Store uploads in this folder” field enter wp-content/uploads then click Save Changes.
    If that does not correct the issue then wp-content/uploads or the currently upload path is not writable. The permissions for the folder should be set to 755. I do not suggest 777 since that makes the directory writable by group and that could make your WordPress site vulnerable. You can change the permissions using any FTP client or from SSH with the command chmod -Rv 755 wp-content/uploads


Google Analytics-Show Full Referrer URL

It is sometimes useful to know the exact page a visitor was referred from to your site. Google Analytics shows you only the domain by default such as, to find the exact page URL, you can create a custom report.

  1. Click on Custom Reporting 
  2. Click New Custom Report
  3. Give the report any name of your choice-I chose to name mine Full Referrer URL 
  4. Click on Add Metric Group, then Visitors and choose Visits
  5. Click add dimension, choose Content then Full Referrer
Your report should look something like the image below(click image to view larger version):
Click on Save.

You will then be directed to a page that shows the report as below (click the image to view a larger version):


Fixing IE8 bugs

When it comes to the way browsers render pages, Internet Explorer has a mind of its own and does not obey any web standards with Internet Explorer 8 being the worst offender.
While working on the plugin Contact Tab, I noticed every version of Internet Explorer except 8 displayed the form correctly. To get IE8 to play nice, use the code below to let it render pages like IE7

if you are not using WordPress/bbPress the last two lines are not needed.



Roundcube database error connection failed

The error “roundcube database error connection failed” indicates the MySQL password for Roudcube isn’t correct. You can usually fix this by running

however this does not always work since /var/cpanel/roundcubepass may not have the correct MySQL password for the user roundcube, the configuration file at  /usr/local/cpanel/base/3rdparty/roundcube/config/ however always has the correct password and you can use the command below to fix the issue:

By must be installed for pthread_cancel to work

If you ever see the error “ must be installed for pthread_cancel to work” for cPanel, this is most likely due to cPanel running out of memory.

You can check the current memory being used by running the command free -tm, you should see an output like the one below:

total used free shared buffers cached

Mem: 1850 1172 677 0 43 559
-/+ buffers/cache: 569 1280
Swap: 2047 0 2047
Total: 3898 1172 2725

To increase the memory limit for cPanel, go to Tweak Settings (in WHM) then search for “Max cPanel process memory”, you can then increase this to say 512MB from the default 256M, then click on Save.


This file is too big. Files must be less than 1500 KB in size.

When installing a theme or plugin for WordPress Multisite you may run into the error “This file is too big. Files must be less than 1500 KB in size.”. By default the maximum upload file limit for WordPress Multisite is set to 1500 KB. To increase this setting navigate to Network Admin -> Settings -> Network Settings and under Uploads Settings, change the “Max upload file size” limit.


Find Joomla 2.5 Version

You can usually find the Joomla version in the libraries/joomla/version.php or libraries/joomla/version.php for Joomla 1.5 and 1.7 respectively, however this has changed with 2.5.

The version is located in the file libraries/cms/version/version.php

With bash, you can use the code below to find the version for any Joomla installation,

[code lang=”bash”]egrep -i  ‘\$release|\$dev_level’ libraries/joomla/version.php includes/version.php libraries/cms/version/version.php 2>/dev/null [/code]

Note that this command has to be run from the Joomla root folder.


Account Creation Status: failed Your system has run out of available ip addresses, or you do not have permission to use any more ip addresses.

If you get this error while creating an account in cPanel, most likely you are trying to use a package that has a dedicated IP assigned or you manually checked ‘dedicated IP’ on the account creation page while your server does not have any dedicated IPs.

To resolve this either edit the package (if the issue is with the package) under Packages >> Edit a Package in WHM or uncheck ‘dedicated IP’ option.

You can also manually edit the package file , if you have root access to the server. The file is located at /var/cpanel/packages/packagename (where packagename is the name of the package).

change this line




Contact Us