[英]I move all the files and folder from the wordpress root directory to wordpress sub directory
I am trying to duplicate to Wordpress files through the Wordpress file manager .我正在尝试通过 Wordpress 文件管理器复制到 Wordpress 文件。 But suddenly I just move all the files and folder from the Wordpress root directory to the sub directory name as haris now if I open this http://www.emcaviation.com/EMC/haris/wp-login.php and use the right logins.
但是突然间,如果我打开这个http://www.emcaviation.com/EMC/haris/wp-login.php并使用正确的登录。 It again redirect to this http://www.emcaviation.com/EMC/wp-login.php and it doesn't exist.
它再次重定向到这个http://www.emcaviation.com/EMC/wp-login.php并且它不存在。 Please let me now what should I do now ?
请让我现在我该怎么办?
Aoa... 将所有 WP 文件夹移动到该 SUB 目录中,包括wp-content
wp-includes
和属于 Wodpress 的文件。
Add below code to functions.php
in active theme.将以下代码添加到活动主题中的
functions.php
。 When you open login page yourdomain.com/EMC/haris/wp-login.php
(you don't have to log in) the options will be updated.当您打开登录页面
yourdomain.com/EMC/haris/wp-login.php
(您不必登录)时,选项将更新。 After all remove the code from the functions.php
.毕竟从
functions.php
删除代码。
update_option( 'siteurl', 'http://yourdomain.com/EMC/haris' );
update_option( 'home', 'http://yourdomain.com/EMC/haris' );
If your production site is installed in a subdirectory, but your development site is installed in the public root, then a change you make on your development site might break when it's migrated to the production site.如果您的生产站点安装在子目录中,但您的开发站点安装在公共根目录中,那么您在开发站点上所做的更改在迁移到生产站点时可能会中断。
You need to access the server as it needs code-level and server-level changes.您需要访问服务器,因为它需要代码级别和服务器级别的更改。 You've different solutions to fix this like: 1.
你有不同的解决方案来解决这个问题:1。
update_option( 'siteurl', 'https://emcaviation.com/EMC/haris' );
update_option( 'home', 'https://emcaviation.com/EMC/haris' );
Use the above code in your functions.php(of the active theme).在您的functions.php(活动主题的)中使用上面的代码。
2nd way You can use your URL with "?123" like example.com/?123.第二种方式您可以使用带有“?123”的 URL,例如 example.com/?123。
You need to access .htaccess file and create a rule for this(redirect rule).您需要访问 .htaccess 文件并为此创建规则(重定向规则)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.