How to compress a whole Lunux/Unix directory into a tarball file

It is extremely easy to compress files and directories in Linux/ Unix using the tar command.  This command is used to create create .tar.gz or .tgz archive files; the so called “tarballs.”  You can do a lot of tasks with this command. It has a lot of options. Man page man tar or help file tar –help always come in handy. The command is useful to create a single archive of a whole project with many files and directories, send it to somebody, download it, etc.

Tar command can be also used on a remote server via ssh. When executed it creates and compresses the archive.  It uses the following syntax :

tar -zcvf archive-name.tar.gz /path/to/mydirectory

This command works recursively, i.e. compresses the content of every directory inside mydirecory.

Here are what the options passed to the command mean:

  1. z   Compress the archive using gzip
  2. c    Create the archive
  3. v    Verbose mode, display the results on the go
  4. f     Gives you the opportunity to choose filename of the archive

How to remove a non empty directory in Linux

Removing directory in Linux is an easy thing. While trying to remove a directory using a command like rmdir seems to be the only one needed.

In real world the directory in question is not empty. There are some files or other directories inside it. You will get warnings like ‘Directory not empty’ and will not be able to delete the folder.
If you want to remove a directory which is not empty you should use rm command:

rm -r exampledir

where exampledir is the directory you want to remove.  The above command with -r option will remove the exampledir with all its content, both files and directories within. Nevertheless,  it will ask you for permission to delete every single file. To avoid this and speed up the execution use:

rm -rf mydir

The -f option tells the command to delete everything withing the exampledir without asking for confirmation.


Methods To Disable Post Revisions And Optimize The Database

wp-optimizeThis time I will share my recent experience dealing with WordPress Database optimization and disabling post revisions. Every author has his/her own experience with post revision option in WordPress. It could be very useful sometimes, if you write your articles and posts in the WordPress editor, but if you prefer to write your content offline and then only import the text, post revisions are waste of space. In such case you can disable Post Revisions option in WordPress. This can be done by adding this line in your wp-config.php file, you can found in WordPress root directory:
define('WP_POST_REVISIONS', false );
Please note this code will disable post revision feature on all future WordPress posts, but you will still need to erase the previous revisions saved in the database. To do this open the phpMyAdmin and in the SQL tab type in the following query:
DELETE FROM wp_posts WHERE post_type = "revision";
Don’t forget to backup your database and change the table prefix from wp_posts to whatever is needed.
Here is the method to disable post revisions feature and clean all past posts revisions using phpMyAdmin. But there is another method, you can do it using a plugin, WP Optimize, for example, which does far more than simply disabling post revisions and purging the ones on old posts. It allows you to clean up your WordPress database and optimize it without doing manual queries.
As usual, don’t forget to backup the database before using the plugin!
Note: the plugin doesn’t disable the future post revisions. You still have to do it manually in your wp-config.php file as mentioned above.

Responsive Video Themes For WordPress

Beautiful Responsive Video Themes For WordPress
Wordpress is one of the most popular content management systems around (together with Drupal and Joomla). Stable and frequently updated, it is suitable for complete newbies and experts alike. There are numerous plugins and themes which can help you make whatever type of website you want out of WordPress installation. You can always rely on wordpress with the quality themes easily available now. One of the trades that can benefit from the ready pre- made specialty WordPress themes is the Video industry. Video portals and tube websites are among the most popular places in the Internet today. They should be able to display videos across the pages of the whole website in full screen or blog style. Another important option for a good video theme is the ability to present the entire collection of videos in a tube way. This is great for displaying the videos on your pages in a condensed fashion. Whether you are looking for a video blog theme or for a full-scale tube theme, here is a small list of WordPress video themes that can help you.
I am going to start the list with the free responsive video themes for WordPress. Finding free themes for WordPress that are going to fit your video website project is a very difficult task. Firstly, almost all of them are either outdated or are simply a light version of a premium theme with some of the most attractive options disabled.

Anew Free Responsive Video Theme For WordPress

free video theme for wordpress responsive design
This is my top pick for a free wordpress theme that have video support enabled, no strings attached. The theme displays the posts in a classic blog fashion, and has a specially designed video post format to show-cast your vids. In addition the theme has 10 different post formats to display content in a unique manner, ability to embed videos from Youtube and Dailymotion with a single copy and paste of the url or add the raw HTML5 video code.

Anew More Info & Download    Anew Live Preview

Sundance Free Responsive Video Theme For WordPress

Despite its minimalist design, Sundance was crafted with clean, elegant typography and close attention to detail. The home page offers a featured video carousel. It supports the video post format, widgets, custom background, custom header, custom menus, and a custom link feature for your social media pages.

Live Preview    Download Sundance

Mixfolio Free Responsive Video Theme For WordPress

Mixfolio is a responsive, HTML5 portfolio theme for WordPress. Use it to build your portfolio or your online brand. Create Image, Gallery, Video or Standard posts using Mixfolio Post Formats feature.
Live Preview    Download Mixfolio

VideoTube Premium Responsive Video Theme For WordPress

VideoTube – A Responsive premium video WordPress theme, one of most popular ones, a bestseller in the industry. The theme offers support for both embedded and self-hosted videos. The theme supports many video sites like Youtube and DailyMotion, just copy and paste the link and you are ready to go. The theme also supports self hosted videos in mp4, m4v,webm, ogv, wmv, and flv formats. Other features include support for the Video Thumbnails plugin, user submission, shortcodes, etc.
Live Preview    Download VideoTube

deTube Premium Responsive Video Theme For WordPress

deTube Premium Responsive Video Theme For WordPress
deTube is a responsive premium WordPress theme, one of the oldest and most used in the industry. It offers three options to embed video: embed self hosted video, embed video from popular video sites like YouTube and Vimeo, and raw video code. The theme gives support for Video Thumbnails plugin and makes use of ‘WP Postviews’ and ‘WP Pagenavi’ plugins. DeTube works with 4 players, MediaElement, FlowPlayer, and jPlayer.
Live Preview    Download deTube

BeeTube Premium Responsive Video Theme For WordPress

BeeTube Premium Responsive Video Theme For WordPress
This responsive premium video theme for WordPress is the last pick for a video wordPress theme. The theme offers all the features expected from a full- blown premium WordPress tube theme: support for Youtube and DailyMotion videos, user submissions, grid view system, robust video slider,support for Video Thumbnails plugin, and WP Postviews’ and ‘WP Pagenavi’ plugins.
Live Preview    Download BeeTube

Caching Plugins WordPress

Caching is one of the best ways to optimize WordPress and improve its performance. Plugins like W3 Total Cache or WP Super Cache can be easily installed and will cache your blog posts and pages and they will be served as static html files. These static pages reduce the server load processing dynamic content and serving it as a static file.
Posts and pages caching can be done on a server on browser level. While browser caching reduce server load by caching the files on user’s computer, web server caching incorporates caching files on the server locally. Discussing both caching methods in details is beyond the scope of this post.
Caching Plugins WordPress
The aim here is to answer the question which is the best wordpress caching plugin. There are quite a few caching plugins for wordpress but WP Super Cache and W3 Total Cache stand out of the rest. Here I picked the both of them, because they serve different purposes.
The first plugin- WP Super Cache is relatively easy to install and configure, even for an inexperienced user. Choose the basic setup and create static files using one of the three methods. Supercache really comes into it’s own if your server is underpowered, as it is usually the case with the cheap hosting accounts, or virtual hosting accounts. WP Super Cache requires less server resources and has fewer options than W3 Total Cache.
W3 Total Cache is the winner when it comes to caching plugin for wodpress with a lot of additional functions. This plugin caches minified and compressed pages and posts in memory or on disk or on CDN. It can also cache minified and compressed CSS files and Java Scripts in memory, on disc or on CDN. In addition to its main functions it sports several witty option which can come in handy if you want to serve different wordpress theme for the mobile users. Mobile support is done by switching the theme for groups of referrers or user agents. This is just a few of the options this plugin offers. Unfortunately it is not easy to setup for a newbie user, and it consumes more server resources than WP Super Cache. Yet it is a stable plugin, suitable for high traffic sites that will benefit from its many features.

SEO Plugins WordPress

With every new install of WordPress I always strive to keep the number plugins to the minimum. If I don’t need something, I don’t put it there. So I usually install these two plugins from the very beginning:
Comments antispam plugin: Akismet
SEO Plugin WordPress: Yoast SEO or All In One Seo
For the sake of this article I’ve made a brand new installation of All In One SEO plugin. AiOSEO is a simple plugin that does one thing very well: generates unique meta description, keyword, and title tags. The plugins stores the needed information in custom fields rather than creating its own MySQL tables. It’s a clean, well designed plugin that gives you the control you need over tags, social/open graph, and last but not least has a site map functionality.

Yoast SEO plugin: There are lots of configurations and options here, but it is easy to use and the default values are quite useful. For me the best feature for Yoast SEO plugin is its ability to help the wordpress blog authors with their daily SEO needs. With the help Yoast SEO plugin you are able to write optimize the content of every post based on chosen keyword(s). This will help you with your search engine optimization efforts. Not to mention you can choose to nofollow or noindex on per page basis, or whether to include the page in the sitemap or not. This plugin is a lot more flexible than All In One Seo. It has all the functionality AIOS offers, and can help you more than any other SEO Plugins Wordrpress.