Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Local wordpress install only shows home page, all other pages Not Found

I am working on a local install of a live wordpress site, all links from the main page show Not Found errors. all .htaccess files are all present.

The problem is that every page except for the home page is showing a Not Found error, I can't find any problems with permissions or anything else that would cause it to not work.

Is there anything that I can try that I might be overlooking? I apologize for the vauge questions but I am having trouble figuring out where to start.

like image 691
Ty Underwood Avatar asked Jul 12 '13 19:07

Ty Underwood


People also ask

Why it is showing Page Not Found in WordPress?

The 404 error is an HTTP response code that occurs when the server cannot find the file or page requested by the user. In response, the web hosting server automatically sends the user an error message, “404 Not Found“. The WordPress 404 error commonly occurs when: You've newly migrated your site to a new host.

How do I change a page not found on WordPress?

In the left-hand menu of the WordPress Admin Dashboard, go to Appearance -> 404 Error Page. Select the page you have just customized as your 404 page and set it as 404-error page that'll be displayedappear by default, when users land on a broken link: Click Save Changes and that's it.

How do I fix Page Not Found error?

Retry the web page by pressing F5, clicking/tapping the refresh/reload button, or trying the URL from the address bar again. The 404 Not Found error might appear for several reasons even though no real issue exists, so sometimes a simple refresh will often load the page you were looking for.


2 Answers

Log in to the admin panel (localhost/sitedirectory/wp-admin) and go to Settings->Permalinks and click Save Changes. Permalinks often need to be rebuilt after mirroring a site and updating the site url. You don't need to change any settings, just hit save and it will rebuild the permalinks with the selected options.

Also make sure the Apache module mod_rewrite is enabled on your local stack. IIRC WAMP (and possible XAMPP) do not enable this by default. Doing so in WAMP is as simple as clicking the WAMP icon in the taskbar, then going to Apache -> Apache Modules -> mod_rewrite (click to toggle) and then restart all services.

Also I am assuming you already updated the site and home urls (either in the wp_options database table or in wp-config.php). For reference there is a Codex page about this: Moving Wordpress

like image 88
Ennui Avatar answered Oct 13 '22 20:10

Ennui


You can do it in a really simple way. Just go to

Settings >> Permalinks >> and click "save changes" without changing anything.

If it gives you .htaccess file permission issue, you need to set privilege of your ROOT folder (where your wp-content folder lies) to read and write.

And again go to

Settings >> Permalinks >> and click "save changes" without changing anything.

That's all. Hope it resolves the issue.

like image 32
Steele Rocky Avatar answered Oct 13 '22 19:10

Steele Rocky