Somehow when I was working with my local dev environment, I have made some mistakes in some php files which I could not figure it out.

So, I have decided to copy the files from the public_html and paste in my local copy of the WordPress..

Now when I open my website in my local machine, it shows the front page without any problem. But when I click on any other links, to visit any other page, it just kicks me back to


Why this is happening??

I could understand one thing that the permalinks has to be refreshed. But, I could not even access the localhost:8080/mysite/wp-admin. Is there any other way, that I can refresh the permalinks??

What is the procedure to take a copy of wordpress website from online server to offline??

PS: I use xmapp with sql and WordPress 4.9.8

  • I have one more wordpress installed in xampp in htdocs...Thats works well and only this does not work..How does this question is off topic??
    – gloom
    Dec 18, 2018 at 3:38
  • Problem has been solved by visiting the url using the login link directly. And then refreshing the permalinks.
    – gloom
    Dec 21, 2018 at 16:33

2 Answers 2


XAMPP dashboard

XAMP has some default files (example files), you should delete that. It's just there to show you that everything works as expected.

With also an example .htacess which redirects you to dashboard. Before you copy and paste your files, you should have deleted everything in C:\xampp\htdocs (your htdocs)

Manual install or automatic

You could install WordPress by yourself, you will need to download WP, create a database and database user and edited the WP config.php file.

You could also just download an Add-on for XAMPP which does this for you: https://www.apachefriends.org/add-ons.html

And it will install this in a separate folder C:\xampp\apps\wordpress\htdocs which is handy if you want to test other things then only WordPress.

  • Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error. If you think this is a server error, please contact the webmaster. Error 404 localhost Apache/2.4.34 (Win32) OpenSSL/1.1.0i PHP/7.2.10
    – gloom
    Dec 17, 2018 at 18:41
  • I get the above error, once I have deleted all the other files in the htdocs
    – gloom
    Dec 17, 2018 at 18:42
  • Yeah, now you need to properly install / configure WordPress or you could install the addon: apachefriends.org/add-ons.html Dec 17, 2018 at 18:54
  • oops...I have a git repo for the same and a deployment from the git account..Now, everything needs to set it up??
    – gloom
    Dec 18, 2018 at 3:37
  • @gloom Okay, I don't know what you mean. You need to set up WordPress, it doesn't matter if you do this via a git repository. Create your database with PHPMyAdmin go to: localhost/phpmyadmin Dec 18, 2018 at 6:19

One solution is that you might want to include a .htaccess file to your local instance.

  • You might want to go into more detail, explain for which kind of server it works (hint: not Nginx) and what the result to expect, when following your guide, is.
    – kaiser
    Dec 13, 2018 at 6:18
  • 1
    @kaiser well the answer I provided was in the context of the question ie XAMPP + localhost... I experienced this problem before and what's causing it was the .htaccess file.
    – Kevin
    Dec 13, 2018 at 7:17
  • I meant that you could provide a small example of your .htaccess (in that context).
    – kaiser
    Dec 15, 2018 at 23:56

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