XAMPP 在 Windows 上 localhost 运行缓慢的解决办法: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{#seo: | {{#seo: | ||
|description=XAMPP 在 Windows 上 localhost 运行缓慢的解决办法 | |description=XAMPP 在 Windows 上 localhost 运行缓慢的解决办法}} | ||
参考这里 [https://buildio.dev/speed-up-xampp-on-windows/ 提升 XAMPP 在 Windows 上的速度],及这里 [https://serverfault.com/questions/66347/why-is-the-response-on-localhost-so-slow 为什么 localhost 应答慢]。 | 参考这里 [https://buildio.dev/speed-up-xampp-on-windows/ 提升 XAMPP 在 Windows 上的速度],及这里 [https://serverfault.com/questions/66347/why-is-the-response-on-localhost-so-slow 为什么 localhost 应答慢]。 | ||
Latest revision as of 09:27, 10 October 2025
参考这里 提升 XAMPP 在 Windows 上的速度,及这里 为什么 localhost 应答慢。
解决办法:
- 在
httpd.conf
中,把 ServeName=localhost:80 改为 ServerName 127.0.0.1:80 - 在
my.ini
中,把以下几个参数的值都改大一些
145:# innodb_buffer_pool_size=16M #orig
149:# innodb_log_file_size=5M #orig
168:# max_allowed_packet=16M #orig
176:# key_buffer=20M #orig
innodb_buffer_pool_size=512M
innodb_log_file_size=128M
max_allowed_packet=128M
key_buffer=100M
- 在
php.ini
中,把 memory_limit=512M 改为 memory_limit=1512M - 在
LocalSettings.php
中,把$wgDBserver = "localhost";
改为$wgDBserver = "127.0.0.1";
。
目前看,速度有明显提升,后续有待进一步观察。
后续,经测试,依然慢得受不了,继续找别的方案。