sabato 17 settembre 2016

How to automate mysql backup using R1soft-Idera backup

Plain R1soft-Idera backup does not directly support mySQL database backup.

But with this workaround you can backup your mySQL database too.

Run crontab in unix shell and create the rule to launch process for creating database backup:

0 0 * * * /usr/local/bin/mysqldump -uLOGIN -PPORT -hHOST -pPASS DBNAME | gzip -c > `date “+\%Y-\%m-\%d”`.gz

You can modify the script as needed to get a different schedule.

This script will create a .gz file with the backup of your database. It's an ordinary .gz file, and it will be normally backupped as any other files of your server.

Another way to do it is using MySQLDumper: a PHP and Perl based tool for backing up MySQL databases. You can easily dump your data into a backup file and - if needed - restore it. It is especially suited for shared hosting webspaces, where you don't have shell access. MySQLDumper is an open source project and released under the GNU-license.

mercoledì 17 agosto 2016

How To Enable Debug Mode in Joomla

Any issue you find in a Joomla site, it's hard to fix because there're only few details or error messages which can help you.

A precious instrument to fix it is enabling "Joomla debug mode" in Global Configuration, which allows you to see many details about your site, including:

Database queries
Profile Information
Session Data
Memory Usage

To enable Joomla debug mode:
Via backend (Joomla's Administrative Interface), access the page Site => Global Configuration

Amongst various other parameters, you'll find also "Debug Settings" Group.

Setting it to “Yes”, Joomla will add debug information on every page, below the normal web page area. This information will include various forms of diagnostic information, including the full database queries used in generating the page.
The default setting is “No”.
The mix and format of diagnostic information presented by the debug function may be altered by editing the parameters of the Debug - System plug-in (Extensions > Plug-in Manager).

Important Security Note:
the debug information displayed with this parameter set to “Yes” is visible to all users and thus may be a security risk if used on a public web site, but the debug information is visible even if Site Offline is set to “Yes”.
So, it's higly advisable to put site offline previous of enabling debug mode.

Debug Language.
If set to “Yes”, Joomla will activate features designed to help debug language translations for a Joomla site. This includes the addition of language translation information to page debug information (requires Debug System also set to “Yes”), and markers to show translated content within the web pages themselves.

lunedì 15 agosto 2016

Who Can Register a .it domain ?

The registration of a .it domain name is strictly reserved only to persons or entities (organizations, business entities, associations) who have citizenship, residence or a registered office in any of the countries of the European Economic Area (EEA), the Vatican, the Republic of San Marino, and Switzerland.

mercoledì 10 agosto 2016

Favicon: what is it, how to do it

What is a favicon?

A favicon (short for favorite icon), also known as a shortcut icon, website icon, tab icon, URL icon, or bookmark icon, is a very small image, associated with your website or a particular web page.
It will be typically displayed in the browser's address bar, next the page's title on the tab, or next the page's name in a list of bookmarks or in browser history.
The favicon file has .ico extension.
Dimension of a favicon is 16x16 or 32x32

How to create a favicon?

You can make your own favicon using many free on-line tools:

http://favicon.htmlkit.com/favicon/
http://www.favicon.cc/
http://realfavicongenerator.net/

sabato 6 agosto 2016

How To Redirect a Site Using .htaccess - The Easy Way

If you need to redirect a site, or a given page, to another site or to another given URL, the easiest and most powerful way is using .htaccess

Beware: .htaccess is very powerful, but it's not error-proof: even the slightest error (a missing space, or a simple dot) can result in a down of your entire site. So...
1 - make a backup of current .htaccess prior modify it;
2 - test, test, test and verify every modification

To make redirect(s) in .htaccess you have different commands:

301 Redirect (permanent)

Point to a different site or URL on a permament basis.
This is the most useful type of redirect, and it's "SEO friendly"

Examples:

Redirect permanently your entire site to another domain (new-domain.com):
Redirect 301 / http://www.new-domain.com/

Redirect permanently a certain page of your site to another page of another domain:
Redirect 301 /my-old-page/ http://www.new-domain.com/newpage/


302 redirect (temporary)

Point to a different site or URL, but only on a temporary basis (i.e., for maintenance)
The usage is the same as for Redirect 301, but you need to specify 302 instead of 301

Other types of redirect (303, 307 etc.)

There're others types of redirects, which for example have different behaviour regarding the handling of GET and POST message.
For detail about it, see Wikipedia article on the 30x redirection codes: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection

Syntax trick

You can specify "permanent" instead of "301".
So:
Redirect 301 / http://www.newdomain.com/
and
Redirect permanent / http://www.newdomain.com/
is the same command.

Using redirect for site migration

Suppose you're rebranding your site, and moving it from old-domain.com to new-domain.com
Old-domain.com is quite well indexed, with a lot of different pages well positioned in SERP, and a lot of external links pointing to them.
If you just make a full 301 redirect from old-domain.com to new-domain.com, you'll loose a lot of your positioning in SERP. But also will happen that people, arriving from external site through specific links to your site, will not find the right destination page but will get home page or, worstly, a 400 error.
You can fix the issue making a number of redirect 301 command in your .htaccess.

So you can, for example, insert in .htaccess all of following commands:

Redirect 301 /my-old-page/ http://www.new-domain.com/newpage/
Redirect 301 /index.html http://www.new-domain.com/index.php
Redirect 301 /apple.html http://www.new-domain.com/apple/index.php

You can insert as many redirect commands as you need: even hundreds of them.

How to determine what URL to redirect?

Use analytics to analyze what are the URLs of old-domain.com which receive traffic from external links or from search engine.

What about the target page?

Make the target page as similar as possible at the original page; you can use also the same text of the original page, or be sure to use the same keywords; but, and it's mostly important, the target page must be relevant as the original page, and be about the same matter (that's to say: if original page matter is "apple", you must redirect it to a page which matter is "apple" too: if the matter of the target page is "electric engine", you're wrong.
  

giovedì 4 agosto 2016

How To Automatically Make Clickable URL in WordPress

If you need to put a URL in our WordPress content and make this content clickable, the default way is time consuming: you need to add the link manually, using the WordPress's WYSIWG editor.

But WordPress offers a quite easy way to do it automatically.
All you need to do is activate the function make_clickable in your WordPress, and WordPress will do all the job.

To use this function you only need to add one row of extra code on functions.php :

add_filter('the_content', 'make_clickable');

This function works with http URL, email addresses and FTP..

venerdì 29 luglio 2016

How to Create a Rollover Image Effect in HTML

To create a rollover effect using plain HTML is easy, and you can use it nearly on every hosting service (included Blogger and free WordPress.com) service.

You need two different images, same size, like follow:

   


The HTML code to use is:

< img src="FIRST-IMAGE" onmouseover="this.src='SECOND-IMAGE'" onmouseout="this.src='FIRST-IMAGE'" >

The result (roll over it with your mouse to see the effect!):