0

I've moved my Wordpress files from public_html to a subdirectory public_hmtl/my-site.com. I've changed my .htaccess in the public_html directory by

RewriteEngine on RewriteCond %{HTTP_HOST} ^my-site.com$ [NC,OR] 
RewriteCond %{HTTP_HOST} ^www.my-site.com$ 
RewriteCond %{REQUEST_URI} !my-site.com/
RewriteRule (.*) /my-site.com/$1 [L]

I've configured my database and wp-config.php too, to:

define('WP_HOME','https://www.my-site.com');
define('WP_SITEURL','https://www.my-site.com');
define('RELOCATE',true);

But when I want to login per wp-admin the path seems to be like:

wp-login.php?redirect_to=https%3A%2F%2Fwww.my-site.com%2Fmy-site.com%2Fwp-admin%2F&reauth=1

Do you have any idea?

Thanks

Kamil

  • Hey, I don't know why you are using .htaccess to . redirect, you would have done directly by changing the root folder from cPanel or apache config file. – Arvind Singh Jan 17 at 11:44
0

try this >>

step 1) on wp-config.php

define('WP_HOME','https://www.my-site.com/my-site.com');
define('WP_SITEURL','https://www.my-site.com');
define('RELOCATE',true);

now, on your /index.php change this line: require( dirname( FILE ) . '/wp-blog-header.php' ); to

require( dirname( __FILE__ ) . '/my-site.com/wp-blog-header.php' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.