0

I've justed moved my website to localhost using Xampp. I changed some settings to increase speed and I can access every part of my site offline from localhost:8080, instead the wp-admin. I can see the login page and I can enter my info to login, but when I hit enter it takes too much to load and I don't know even if it will be loaded or not, but when I connect to the internet, everything works well. Currently, I can only see the pages and posts offline and WordPress doesn't respond. What is wrong?

Update

I use localhost:8080 to access my site, so I edited wp-config.php and changed

/** MySQL hostname */
define('DB_HOST', 'localhost');

to

/** MySQL hostname */
define('DB_HOST', 'localhost:8080');

but I get the following error:

Fatal error: Uncaught Error: Call to undefined function nocache_headers() in C:\xampp\htdocs\mysite\wp-admin\admin.php:33 Stack trace: #0 C:\xampp\htdocs\mysite\wp-admin\index.php(10): require_once() #1 {main} thrown in C:\xampp\htdocs\mysite\wp-admin\admin.php on line 33

Some of the changes I've made

changing Listen 127.0.0.1:80 to Listen 127.0.0.1:8080 in httpd.conf

Shahriar
  • 1,855
  • 2
  • 21
  • 45
  • Edit question - add details - what settings have you changed to increase speed. – Zydnar Jul 25 '17 at 18:19
  • [First 4 tips in here](https://stackoverflow.com/questions/8432601/wamp-xampp-is-responding-very-slow-over-localhost-) @Zydnar – Shahriar Jul 25 '17 at 18:56

2 Answers2

1

There were wp files in the web root which had file size of 0 bytes.

Uploading proper copies from the zip file resolved the problem.

The same cause of the problem has occurred to me quite a few times in the past, but I had forgotten it.

yassine dotma
  • 697
  • 8
  • 10
0

I also faced the same problem on my site. https://qtoestimating.com However, I was able to fix it temporarily by deleting the files with '0' size in the WordPress directory. But after a few hours, the error came again. So I finally sorted it out by doing a fresh WordPress installation and then shifting my WP-Content folder to new installation.

John
  • 1