0

3/26: I created the Wordpress website on a live server. I downloaded a copy to my XAMPP server. I exported the database and created a local one. I modified the wp-config.php file to connect to it. That all works.

However, I am not able to use any of the links in the navbar and otherwise to open any of the pages and posts. All those hyperlinks have absolute addresses that use the domain name of the live server.

I can add the directory path and go to "/index.php" under localhost but all the other paths are open-ended with no file name and they do not work.

If I do not use "index.php" and just have a "/" it will not go to the homepage. For the homepage, if I leave out the "index.php" file name, it will have the header and navbar and say "Oops! That page can’t be found."

If I use open-ended links to anything else, it will say "Error establishing a database connection."

3/27: Thank you all very much for your responses! I have a plugin installed that I have not used yet called "Velvet Blues Update URLs." I will give that a try. I also have "All-in-One WP Migration" and "Duplicator," but the website is over 600mb in size so the free versions of those will not work.

0

did you change the urls in the database?

add these to your wp-config.php

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

Then update the ones in settings and remove those from the config file.

also update your permalinks as well

1

If you have it available, you can use WP_CLI to search and replace all instances of the URL.

wp search-replace 'oldurl.com' 'newurl.com'

Codex - https://developer.wordpress.org/cli/commands/search-replace/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.