Support » Localhost Installs » Changed URL & Home; now can’t access site, dashboard, etc. on local host

  • I know that many people have had this problem, and I have searched and tried recommendations without success. I am new to WordPress, using MAMP to work locally to develop and experiment with a website revision. I thought that changing “URL” and “Home” in Settings > General would set the correct directory format for my eventual upload of the site. Instead, now I can’t access the pages I have been working on, or the dashboard, or wp-admin, etc.

    I have tried resetting “URL” and “Home” through phpMyAdmin > Databases > mydatabase > wp_options. That seemed like it should work, but when I click “My Website” from the MAMP start page, then wordpress-5.7.2 > wordpress/, I get a 404 page. Adding wp-admin to the URL also led to a 404 page.

    I also tried adding code to the wp-config file, as others have suggested, with no change.

    When I originally changed the URL and Home settings, I used https, instead of http. I wonder if this throws in an extra complication? Also, in case this is relevant, I am using Astra as my theme. I’m about ready to re-load WordPress and start over, but I hope someone can offer an easier solution.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Changing the URL’s in phpMyAdmin is the right thing to od, but make sure you switch them back to exactly what they were before. If you weren’t using https then, don’t use it now.

    When it comes time to set the site live, that’s when you should change the URl’s on the live site using a duplicaor plugin or a good search-and-replace plugin (dont try to do that in the database yourself).

    Thread Starter ratmaze

    (@ratmaze)

    Prior to my change, the URLs were:
    http://localhost/wordpress-5.7.2/wordpress/
    After changing it back in phpMyAdmin, I have looked at it several times in case I included a typo, but I don’t think that’s the problem.

    Thread Starter ratmaze

    (@ratmaze)

    I decided to go ahead and re-load MAMP and WordPress. Before starting, I saved a copy of my wordpress file from htdocs to my desktop, with the hope of restoring part or all of my previous work (not a huge amount of work, but still . . .). On my first try, I opted not to delete those files as I de-installed MAMP, but, when I re-installed, I had the same problem. On the second try, I deleted everything, then re-installed MAMP and WordPress. It is working normally now. Any suggestions on what I should or should NOT attempt to retrieve from the saved files? I don’t want to just re-create my earlier problem.

    Thread Starter ratmaze

    (@ratmaze)

    Well, last night, after re-installing MAMP and WordPress, I was able to begin re-building my home page. Just after writing the previous message, I started MAMP and clicked Open WebStart Page and ended up with this:

    The virtual host was set up successfully.
    
    If you can see this page, your new virtual host was set up successfully. Now, web content can be added and this placeholder page1 should be replaced or deleted.
    
    Server name: localhost
    Document root: C:/MAMP/htdocs
    
    1 Files: index.php and MAMP-PRO-Logo.png

    I’m confused.

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