Move Drupal Setup from one PC (Desktop) to another

Suppose you are running  drupal on localhost using xammp. You got a new device and you now need to move my whole site and drupal setup from one PC to another. How can you do that?

  1.  Install lamp/wamp/xammp on your new device
  2.  Copy your /drupal/ directory from your old PC- to xammp/htdocs
  3.  Next you will need to move your database. To do this export the database associated with your current drupal installation on your old PC in a file preferably .sql extension. You can do this using phpmyadmin
  4.   Move the .sql file created in above step to  xammp/htdocs or in www/ in case its wamp or lamp on your new device
  5.  Import the database file in your new device with phpmyadmin
  6. Ensure that database connection details is correctly mentioned in '/sites/default/settings.php' of your drupal installation.

Hope this helps.