网站优化

网站优化

Products

当前位置:首页 > 网站优化 >

Wordpress主页301重定向到localhost

GG网络技术分享 2025-03-18 16:12 4


问题描述:

I\'ve just moved a WordPress website from my local machine to the server. All the normal steps were done, such as updating the SQL database and setting it all up. The only problem is the homepage is 301 redirecting to my local URL even though it has the correct URL to go to. The rest of the website is fine including the admin area. So far I\'ve done the following:

  1. Checked the SQL database to look for any localhost URL\'s
  2. Defined the wp_home and wp_siteurl in the wp-config file
  3. Also defined it in the functions file
  4. Disabled caching
  5. Flushed the permalinks
  6. Disabled plugins
  7. Checked for hardcoded URL\'s in the PHP
  8. Deleted the .htaccess file and created a brand new one

Any further ideas please?

图片转代码服务由CSDN问答提供

感谢您的意见,我们尽快改进~

功能建议

我刚刚将WordPress网站从本地计算机移动到服务器。 完成了所有正常步骤,例如更新SQL数据库并将其全部设置完毕。 唯一的问题是主页301重定向到我的本地URL,即使它有正确的URL去。 该网站的其余部分很好,包括管理区域。 到目前为止,我已经完成了以下操作:</ p>

  1. 检查SQL数据库以查找任何localhost URL </ li>

  2. 定义wp_home和wp_siteurl in wp-config文件</ li>

  3. 也在函数文件中定义</ li>

  4. 禁用缓存</ li>

  5. 刷新永久链接</ li>

  6. 已停用的插件</ li>

  7. 已检查PHP中的硬编码网址</ li>

  8. 已删除.htaccess文件并创建了一个全新的文件</ li>

    </ ol >

    还有其他想法吗?</ p>

    </ div>

    网友观点:

    The solution to the problem was just browser caching, just needed to load it in a different browser which was cache free

标签:

提交需求或反馈

Demand feedback