简体   繁体   中英

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 . 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. It again redirect to this http://www.emcaviation.com/EMC/wp-login.php and it doesn't exist. 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. When you open login page yourdomain.com/EMC/haris/wp-login.php (you don't have to log in) the options will be updated. After all remove the code from the 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.

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).

  1. 2nd way You can use your URL with "?123" like example.com/?123.

  2. You need to access .htaccess file and create a rule for this(redirect rule).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM