• Hi,
    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:
    https://localhost/site_old becomes https://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)
  • 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:
    https://codex.www.ads-software.com/Moving_WordPress

    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:
    https://httpd.apache.org/docs/current/vhosts/
    And put the domain name into your “hosts” file, details here:
    https://en.wikipedia.org/wiki/Hosts_%28file%29

    Thread Starter fermanus

    (@fermanus)

    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)
  • The topic ‘Cannot change site name and url as expected using XAMPP’ is closed to new replies.