Search This Blog

Sunday, September 17, 2017

Import SQL File from Command Line (CLI)

Here's a simple way to import your SQL file/dump using your Command Line Interface (CLI) or what is also known as Terminal:
 mysql> USE database_name;  
 mysql> source filename.sql;  

Saturday, September 16, 2017


You can reset the AUTO_INCREMENT value in MySQL either by using a SQL command or by using phpMyAdmin.

1. Using SQL Command:
 ALTER TABLE 'field_name' AUTO_INCREMENT =1;  

- field_name is the name of the column whose AUTO_INCREMENT value you want to reset.

2. Using phpMyAdmin Operation:
 - First open the table whose AUTO_INCREMENT value you would like to reset.
 - Once inside the table click on the Operation tabs as shown in the image below.

Click on image to enlarge

3. To save the changes you've made, click on Go.

Friday, September 15, 2017

Add Country Selection List to your BuddyPress Profile & Registration Page

Add Country List in BuddyPress Profile & Registration Page

In this tutorial I will show you how you can easily add a Country list, as shown in the image above to your BuddyPress User Extended Profiles or Wordpress Registration Page using BuddyPress.

1. First head over to Github & download the following code:

As you must have noticed in the comments, in the Github page of the above code; you may have to add the following line of code just before the foreach loop at line number 222; which is basically, you are initializing the value of $i to 1. 

 $i = 1;  //

Copy the above code and add it to your 'bp-custom.php' file. If this file already exists in your site then it should be located at 'wp-contents/plugins/bp-custom.php'; else you have to create it and place it at the aforementioned location. You can read more about 'bp-custom.php' file here: There you will be able to understand why it's best to add the above code in your 'bp-custom.php' file and not in your theme's 'function.php' file.

Now, open the following link to access the Country List. Suppose, your site name is, then you will have to enter: You should now be able to view a Country List field as shown in the image below:

 - Once you are able to view the Country List in your Profile Fields page you may remove the above code from your 'bp-custom.php' file, else your 'bp_xprofile_fields' table, which is the table that stores the above country list might go on getting unnecessarily populated with the all the above 193 country names.
- Only edit your field after removing the above code from your bp-custom.php file for aforementioned reasons.
- If you would like to have the Delete option for this field in your Profile Fields Admin Page, then  change line 14 as below:
 'can_delete'   => true,  

- Likewise you can also alter the value of the 'name' and 'description' fields in the code itself.

Saturday, September 9, 2017

[SOLVED] - Hash Sum mismatch, Ubuntu 14.04

If you have been repeatedly getting the following errors when trying to update Ubuntu, and have perhaps the simple solution I tried my help you.

>> Error:
 W: Failed to fetch Hash Sum mismatch  
 W: Failed to fetch Hash Sum mismatch  
 W: Failed to fetch Hash Sum mismatch  
 E: Some index files failed to download. They have been ignored, or old ones used instead.  

All the solution mentioned here didn't work for me:
>> Solution: Finally this simple solution worked for me:

[SOLVED] - Hash Sum mismatch, Ubuntu 14.04

1. Open your Unity Dash and type 'Software & Updates' and select it.

[SOLVED] - Hash Sum mismatch, Ubuntu 14.04

2.  Try with various mirrors available from the 'Download from' list. You can start with Main Server and if that doesn't work out other mirrors.

This approach worked for me, try it, might work for you as well.

Install Latest Version of Vivaldi Browser in Ubuntu using your Terminal

If you are looking to install the latest version of Vivaldi in your Ubuntu installation, execute the commands below:

Step 1. First copy the Vivaldi .deb package download link from Vivaldi's page at: & RIGHT CLICK, COPY the link location as shown in the image below:

Step 2. Now open your Terminal (CTRL+ALT+T) and enter the following commands:


Replace the above link with the link you copied in Step 1.

 sudo dpkg -i vivaldi-stable_1.11.917.43-1_amd64.deb  

You can start Vivaldi from your browser by entering:

 $ vivaldi  

If in any caseyou would like to REMOVE Vialdi, please enter the commands below:

 sudo apt-get remove vivaldi*  

Wednesday, August 30, 2017

[SOLVED] - Restart Nautilus From Your Terminal

To restart nautilus from your Terminal enter the following commands:

 nautilus -q && nautilus &  

Now Press:


Top Magento Hosting:

Top 5 Posts (Weekly)