Change WordPress Admin Login Logo & Link

Change WordPress Logo Code

function custom_login_logo() {
    echo '<style type="text/css">
        h1 a { background-image:url(/images/logo.jpg) !important; }
    </style>';
}

add_action('login_head', 'custom_login_logo');

Change Logo Link

function my_login_logo_url() {
    return get_bloginfo( 'url' );
}
add_filter( 'login_headerurl', 'my_login_logo_url' );

function my_login_logo_url_title() {
    return 'Your Site Name and Info';
}
add_filter( 'login_headertitle', 'my_login_logo_url_title' );

Database Export/Import through SSH Commands

Exporting MySQL Data

This example shows you how to export a database. It is a good idea to export your data often as a backup.

  1. Using SSH, execute the following command:
            
            mysqldump -p -u username database_name > dbname.sql
    
  2. You will be prompted for a password, type in the password for the username and press Enter. Replace username, password and database_name with your MySQL username, password and database name.

The file dbname.sql now holds a backup of your database and is ready for download to your computer.

To export a single table from your database you would use the following command:

mysqldump -p --user=username database_name tableName > tableName.sql

Again you would need to replace the username, database and tableName with the correct information.

Once done the table specified would then be saved to your account as tableName.sql

Import A MySQL Database

The file must be in .sql format. It can not be compressed in a .zip or .tar.gz file.

  1. Start by uploading the .sql file onto the Bluehost server
  2. If you haven’t already done so, create the MySQL database via the cpanel. Click Here for further instructions
  3. Using SSH, navigate to the directory where your .sql file is.
  4. Next run this command:
    mysql -p -u username database_name < file.sql 

To import a single table into an existing database you would use the following command:

mysql -u username -p -D database_name < tableName.sql

Google are going to change search algorithm on 21st April (Ranking up mobile sites)

As per google recent post , The are going to change the search algorithm & going to make site rank up which has perfect mobile version.
Check your site for mobile optimization if its done or not yet, If its not then make a mobile version of your site before 21 April. To make sure your website mobile version test your website with following google tool.
Here is the detail about new algorithm from google.
Read more

Controlling Those ETags via .htaccess

ETags are difficult because they take precedence for caching in most browsers. You can change all the headers you want, but if the ETag associated with a file is always the same, caching will never work how you expect. In most situations, you should turn your ETag headers off.

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(\.gz)?$">
Header unset ETag
FileETag None
</FilesMatch>

How to enable gzip compression on Apache

To make apache web server compress all CSS and javascript files by using mod_deflate module you need to add these strings to .htaccess or to httpd.conf or vhost.conf file depending on web-hosting configuration. File .htaccess can be found in the root folder of the site.

<IfModule mod_mime.c>
 AddType application/x-javascript .js
 AddType text/css .css
</IfModule>
<IfModule mod_deflate.c>
 AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/javascript
 <IfModule mod_setenvif.c>
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
 </IfModule>
 <IfModule mod_headers.c>
  Header append Vary User-Agent env=!dont-vary
 </IfModule>
</IfModule>