Link to home
Start Free TrialLog in
Avatar of scooter1977
scooter1977

asked on

WordPress htaccess and permalinks

I have a WordPress site that I am trying to recreate locally for development purposes. I want to be able to test things and makes changes without touching the live site.  

I have obtained the SQL backup and my files (images, etc)  and installed WordPress locally. I am using WAMP and have changed the site address to http://localhost.  Everything is up and running for the most part except my menu items and the link structure.

Right now on my live site I have a menu bar across the top that links to subpages using the format of  domain.com/pagename for example:  /career,  /contact, /about, etc.   Those links are all broken.  I get a page cannot be found error.  I can get to the pages and verify they are functional by going to the pages section of the admin and launching "view" from there, when they launch they have the URL of Domain.com/?page_id=XX  

If I go into the permalinks settings and change it from default to post name my menu items still do not work and when I go back to pages to try to launch them using "view" they will then no longer load at all.  

What do I need to do to get the menu items to load using the URL structure of Domain.com/pagename
Avatar of Member_2_760301
Member_2_760301
Flag of Ireland image

Hi,

Add in C:\Windows\System32\Driver\Etc\Hosts the domain as:

127.0.0.1    yourdomain.com

Now load your website as: yourdomain.com not as localhost

Maybe your permanent links in db are containing the hostname.

Let me know if this helped you.

Kind regards,
Cristian
ASKER CERTIFIED SOLUTION
Avatar of Mandeep Singh
Mandeep Singh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of scooter1977
scooter1977

ASKER

Worked like a charm and so simple.  Many thanks !