最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】本地wordpress显示内容布局错乱

显示 crifan 1489浏览 0评论
已经解决了:
【已解决】Mac中MAMP的本地Wordpress首页出错:无法打开页面
但是页面布局错乱,估计是css的问题。
去console看看,果然问题一堆:
感觉是之前修改了.htacess的问题?
放回来,且修改为对应的:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp_xxx/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp_xxx/index.php [L]
</IfModule>

# END WordPress
结果:
问题依旧。
输入:
http://localhost:8888/wp_xxx/wp-admin
跳转到:
http://localhost:8888/wp-login.php?redirect_to=http%3A%2F%2Flocalhost%3A8888%2Fwp_xxx%2Fwp-admin%2F&reauth=1
Not Found

The requested URL /wp-login.php was not found on this server.
然后找不到原因
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (mediaelementplayer-legacy.min.css, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (grid.css, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (wp-mediaelement.min.css, line 0)
chrome
Failed to load resource: the server responded with a status of 404 (Not Found)
wp-mediaelement.min.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
grid.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
layout.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
wordpress localhost Failed to load resource: the server responded with a status of 404 (Not Found)
How to Fix WordPress Failed to load resource 404 status error | Kickstart Commerce
php – WordPress can’t load styles: Failed to load resource: the server responded with a status of 404 (Not Found) – Stack Overflow
php – Failed to load resource: the server responded with a status of 404 Not Found – Stack Overflow
http://localhost:8888/wp-includes/js/mediaelement/mediaelementplayer-legacy.min.css?ver=4.2.6-78496d1
->
加上wp_xxx的路径:
可以打开:
对比了:
没看出其他重要的配置的差异啊
难道还是mysql中的配置导致的?
wordpress localhost the server responded with a status of 404 (Not Found)
wordpress theme link url – WordPress Development Stack Exchange
https://codex.wordpress.org/Changing_The_Site_URL
感觉就是和site url之类的配置有关系
所以去看看另外一个本地可以正常运行的wordpress的配置中
和现在出错的wordpress有何区别
找到了,正常的是:
即:
siteurl和home,都是:
http://localhost:8888/wordpress
而此处出错的是:
去改为:
然后就对了:
http://localhost:8888/wp_xxx/
除了个别图片,其他内容都可以正常显示了。

转载请注明:在路上 » 【已解决】本地wordpress显示内容布局错乱

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
80 queries in 0.187 seconds, using 22.08MB memory