gpt4 book ai didi

php - 子目录中的 Wordpress 克隆

转载 作者:行者123 更新时间:2023-12-04 02:35:42 25 4
gpt4 key购买 nike

我正在尝试将 Wordpress 站点克隆到子目录中。因此,我将有两个安装,一个在域的根目录中,一个在/test 中。我的问题是,即使我更改了数据库中 siteurl 和 home uri 的值,我的链接也会重定向到 root。因此,像 domain.com/test/contact 这样的页面将重定向到 domain.com/contact,这不是我想要的。

最佳答案

您需要按照以下步骤将您的 WordPress 网站从生产服务器克隆到临时服务器 -

1. First export database of production server WordPress website and open SQL file in an text editor.
2. Then find your domain name(domain.com) and replace it at all places with your domain name/test like domain.com/test.
3. Import production SQL file to test database from phpmyadmin.
4. Open staging WordPress admin like domain.com/test/wp-admin and go to Settings > Permalink section. Just click on the Save button to update htaccess file.
5. Optionally you can go to setting at admin page and save all general settings, menus and check Widgets area too.
6. Now you can access your domain.com/test WordPress website.

关于php - 子目录中的 Wordpress 克隆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20903010/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com