Support » Localhost Installs » Cannot change site name and url as expected using XAMPP

  • fermanus


    I wanted to change the name and url of my local site (from site_old to site_new). Site_old is located at XAMPP/htdocs/site_old.
    To achieve this, as found in numerous tutorials, I modified the site’s name and url in wp-options so:
    http://localhost/site_old becomes http://localhost/site_new.
    When trying to see the site I get a 404 error unless I manually rename the folder where the wp files are stored.
    i.e XAMPP/htdocs/site_old must be renamed to XAMPP/htdocs/site_new for accessing the site.
    I must be missing something very basic but I could not find an explanation in the various tutorials I consulted in which they proceed exactly as I do (but for distant sites). Is there something special with XAMPP or am I doing something stupide.

    Thanks a lot for help

Viewing 2 replies - 1 through 2 (of 2 total)
  • RossMitchell


    Of course the directory name must match the URL and file path of the website and the various website resources.

    Maybe you should be reading and using the “moving WordPress” docs, this directly addresses these questions. Details here:

    On the other hand, I would be encouraging you to leave all this stuff of addressing sites via “localhost” and instead use the VirtualHost configuration method instead. This lets you name sites with URLs that are real, it makes transitions to/from hosting very easy.

    Configure your localhost to use a domain name using these instructions:
    And put the domain name into your “hosts” file, details here:



    Thanks for answering so rapidly. Of course! sometimes one can make stupid mistakes. Thanks also for recommending that I configure my local host. I’ll have a look at the documentation.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.