Installing new theme on running site

In this case i will do:

  • create a new folder inside website root folder (ex: mynewsite)
  • create a new db and import the old website db to it
  • copy old website files and folders to the new directory (mynewsite)
  • change db name, user etc in wp-config on mynewsite folder
  • define site url by adding to wp-config.php

    define('WP_HOME','http://youdomain.com/mynewsite');
    define('WP_SITEURL','http://example.com/mynewsite');
    

after doing this visit http://youdomain.com/mynewsite and start making changes on it, after finishing with the changes you have to change your domain destination to the new directory mynewsite that you created and thats all.