1

I downloaded all the contents of my WordPress site (from httpdocs) into a folder C:\xampp\htdocs\test-site. My XAMPP/Apache runs at port 8080. I also downloaded a dump.sql file of the database and changed the path from www.mysite.com to localhost:8080/test-site. Created the new database in my phpmyadmin and uploaded the modified dump.sql. I also modified the wp-config.php for the database name, the usernamne (root) and the password I use locally. When I give the site url in the browser (localhost:8080/test-site) it returns automatically to localhost:8080/dashboard (Welcome to XAMPP screen). Do you have any idea how to fix this and manage to make my site work locally?

Update

In the access.log of Apache I get the following message: "GET /test-site/ HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36". It might helps.

  • Looks like it's getting redirected, probably by the server's config, so I'd suggest checking your Apache settings and the .htaccess file inside the test-site folder. Also make sure that you have test-site in your website's URL in WP settings (in the options table of MySQL database), otherwise it might redirect to the root which in turn redirects to the dashboard. – Dmitriy Gamolin Oct 18 '16 at 16:14
  • @Dimitriy Demir. I checked and I found all details you describe to be OK. Also in wp-config.php I corrected the define('DB_HOST', 'localhost:8080'); (it was initially without the port in localhost. However after a long-long time loading the page I get just an empty page! Any ideas? – Kirkos Oct 18 '16 at 17:14
  • @Dimitriy Demir. Actually it's not the port that was missing. I checked again with another local WordPress website and it works fine without the port: define('DB_HOST', 'localhost');. If I use the port then it appears to have the same problem (never loads the start page). So, we return to the initial question: why it redirects? – Kirkos Oct 18 '16 at 17:31
1

Finally it was solved as follows:

  1. Enabled debug option in wp-config.php
  2. After several tests I found that a plugin (polylang) causes a conflict with Cherry Framework which I use with my template. I Removed the polylang plugin directory and managed to login WP admin. Since I use Cherry Framework I got an error message (File Not found) for wp-content/themes/mytheme/bootstrap/less/bootstrap.less and wp-content/themes/mytheme/style.less. So I removed the bootstrap.less.cache and style.less.cache from the corresponding folders.
  3. After I logged in the WP-admin reinstalled the plugin and everything came back to normal.
|improve this answer|||||
  • Congrats. So everything works well now? – Eager2Learn Oct 19 '16 at 17:16
  • Yes, everything works fine! Thank you for your advises. However the Polylang plugin still seems to cause problems with Cherry Framework. I tried to update locally the WordPress and the plugins and faced some issues. – Kirkos Oct 20 '16 at 7:09
  • Cherry Franework is very unstable. Which theme do u use? Custom or ready-made? – Eager2Learn Oct 20 '16 at 14:30
  • Unfortunately you have right!. I realized this by the hard way! My theme is ready-made in order to reduce customization work. – Kirkos Oct 20 '16 at 22:47
0

Did you edit all links in database dump? All permalinks stored in database dump must be changed from your old live link to http://localhost.

Also, could you login in WP admin? Or you changed site link in database?

Also feel free to delete .htaccess file on local server.

If that does not help, then rename plugins folder, to disable them all.

And of course, enable debug option in wp-config file.

|improve this answer|||||
  • I edited the links and replaced all http://www.mysite with http://localhost:8080/test-site. I wonder if the port should be present. I'll check for the others you mentioned and let you know. – Kirkos Oct 18 '16 at 21:20
  • You dont need port, just localhost/test-site – Eager2Learn Oct 18 '16 at 21:36
  • Wrong IMHO, you need the port if it is different from your webserver's standard HTTP port - which in case of Apache httpd is port 80. – Bunjip Oct 19 '16 at 13:25
  • Wordpress recognize all Apache ports; default apache ports are 80 and 8080 as well, so port is not a part of issue in this case. – Eager2Learn Oct 19 '16 at 17:17

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.