enable HTTP Compression

Many of the website did teach how to check HTTP Compression, what Apache module is needed, but there are less guide on how to make it done.

Today, Mick Genie will guide you how to make it done.

Firstly, you may need to compile your Apache with mod_gzip and mod_deflate (Actually Apache 1.x needed mod_gzip and Apache 2.x needed mod_deflate, hence you may compile both of them).

Once done, modify your httpd.conf and assume it is located in /usr/local/apache/conf. Add the following line to the configuration file.

<Location />
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI  \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary

Restart the httpd services.

service httpd restart

The above command from httpd.conf will compress all the files except the .gif, .jpe, .jpeg and .png files.

How WordPress feeds working?

Recently Mick Genie concentrate to Feed (RSS) from all around the world and found out that it is useful for a Tech Savvy to understand and know the news around the world.

To avoid outdate from the line Mick Genie stand right now, FeedDemon become my good friend. However, we are not discussing this by today but Mick Genie will guide you how the WordPress feeds working.

WordPress do built-in some feeds with RDF, RSS 1.0, RSS 2.0, ATOM for mail blog and your comments. To understand for more, please refer to detail below,

Feeds format for permalink,
http://mickgenie.com/feed/ (RSS 2.0 format)
http://mickgenie.com/feed/rss2/ (RSS 2.0 format)
http://mickgenie.com/feed/rss/ (RSS 0.92 format)
http://mickgenie.com/feed/rdf/ (RDF/RSS 1.0 format)
http://mickgenie.com/feed/atom/ (Atom format)

Continue reading How WordPress feeds working?

Identify slow MySQL query

Sometimes, MySQL will make your server pain if you have user abusing it. Mick Genie will teach you to identify which MySQL database creating the problem to your server.

Actually MySQL can log all of the those query that taking longer time than certain seconds.

1. Login to the server as root.
2. Open your my.cnf with your editor.

vi /etc/my.cnf

3. In the [mysqld] section, add the line as below.

log-slow-queries = /var/log/mysql-slow.log
long_query_time = 3

this meant that the log will logged to /var/log/mysql-slow.log and the query time is 3 seconds.

4. Save the my.cnf by typing “:wq!” and press enter.
Continue reading Identify slow MySQL query

Suggestion steps to migrate a large site from WHM/cPanel

If you are familiar with WHM/cPanel, you sure have this problem while trying to migrate a website more than 2GB and found out the file/folder or any data not updated.

Today, Mick Genie will suggest a better way(my suggestion) to perform the migration.

But before that, please understand the command as below.

/scripts/pkgacct username

With Mick Genie’s suggestion, your site migration will down for minutes(depend on the size).

1. Go to the user root directory.

cd /home/username/

Continue reading Suggestion steps to migrate a large site from WHM/cPanel