main-domain of WordPress keeps redirecting to subdomain
I was in process of deploying my WordPress website mysite.com/NewSite
to mysite.com
during the deployment I messed up something and my main site has started redirecting from mysite.com
to mysite.com/NewSite
.
I have deleted everything from root folder, checked cPanel redirects section etc but everything looks fine. I also created .htaccess file under public_html folder but still no luck.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
My web site is presently down.
php wordpress .htaccess deployment
add a comment |
I was in process of deploying my WordPress website mysite.com/NewSite
to mysite.com
during the deployment I messed up something and my main site has started redirecting from mysite.com
to mysite.com/NewSite
.
I have deleted everything from root folder, checked cPanel redirects section etc but everything looks fine. I also created .htaccess file under public_html folder but still no luck.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
My web site is presently down.
php wordpress .htaccess deployment
I tried to revert everything but still didn't fix the issue.
– Aamir Shahzad
Nov 19 '18 at 22:26
1
This could be a browser cache issue. Try it in another browser or clear your browser cache.
– CUGreen
Nov 20 '18 at 3:09
Please read Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers? - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions.
– halfer
Nov 20 '18 at 18:16
add a comment |
I was in process of deploying my WordPress website mysite.com/NewSite
to mysite.com
during the deployment I messed up something and my main site has started redirecting from mysite.com
to mysite.com/NewSite
.
I have deleted everything from root folder, checked cPanel redirects section etc but everything looks fine. I also created .htaccess file under public_html folder but still no luck.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
My web site is presently down.
php wordpress .htaccess deployment
I was in process of deploying my WordPress website mysite.com/NewSite
to mysite.com
during the deployment I messed up something and my main site has started redirecting from mysite.com
to mysite.com/NewSite
.
I have deleted everything from root folder, checked cPanel redirects section etc but everything looks fine. I also created .htaccess file under public_html folder but still no luck.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
My web site is presently down.
php wordpress .htaccess deployment
php wordpress .htaccess deployment
edited Nov 20 '18 at 18:16


halfer
14.4k758109
14.4k758109
asked Nov 19 '18 at 22:16
Aamir ShahzadAamir Shahzad
4,32563751
4,32563751
I tried to revert everything but still didn't fix the issue.
– Aamir Shahzad
Nov 19 '18 at 22:26
1
This could be a browser cache issue. Try it in another browser or clear your browser cache.
– CUGreen
Nov 20 '18 at 3:09
Please read Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers? - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions.
– halfer
Nov 20 '18 at 18:16
add a comment |
I tried to revert everything but still didn't fix the issue.
– Aamir Shahzad
Nov 19 '18 at 22:26
1
This could be a browser cache issue. Try it in another browser or clear your browser cache.
– CUGreen
Nov 20 '18 at 3:09
Please read Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers? - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions.
– halfer
Nov 20 '18 at 18:16
I tried to revert everything but still didn't fix the issue.
– Aamir Shahzad
Nov 19 '18 at 22:26
I tried to revert everything but still didn't fix the issue.
– Aamir Shahzad
Nov 19 '18 at 22:26
1
1
This could be a browser cache issue. Try it in another browser or clear your browser cache.
– CUGreen
Nov 20 '18 at 3:09
This could be a browser cache issue. Try it in another browser or clear your browser cache.
– CUGreen
Nov 20 '18 at 3:09
Please read Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers? - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions.
– halfer
Nov 20 '18 at 18:16
Please read Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers? - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions.
– halfer
Nov 20 '18 at 18:16
add a comment |
2 Answers
2
active
oldest
votes
Make sure these two settings in your "options" table are correct:
siteurl
home
From the database admin, you could update them with:
update wp_options set option_value='http://example.com' where option_name='siteurl';
update wp_options set option_value='http://example.com' where option_name='home';
EDIT: If you've already changed these settings, and confirmed that there isn't a .htaccess redirect happening, the next place to look is in the web server's configuration for any redirects. These could have been previously placed in the VirtualHost configuration file for example.
add a comment |
Update the options table in MySQL database (in phpmyadmin ...)
Most options are also available in WP admin, but in your case you cannot access wp-admin right now
As site root has nothing in it other than a sub folder... Isn't it should go to error page? why its still redirecting...
– Aamir Shahzad
Nov 19 '18 at 22:36
I have checked wp-options and everything looks good there... when I install a fresh copy of wordpress... mysite.com/wp-admin is accessible and all of its settings but as soon as I hitmysite.com
it redirects tomysite.com/NewSite
– Aamir Shahzad
Nov 19 '18 at 22:38
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53383433%2fmain-domain-of-wordpress-keeps-redirecting-to-subdomain%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Make sure these two settings in your "options" table are correct:
siteurl
home
From the database admin, you could update them with:
update wp_options set option_value='http://example.com' where option_name='siteurl';
update wp_options set option_value='http://example.com' where option_name='home';
EDIT: If you've already changed these settings, and confirmed that there isn't a .htaccess redirect happening, the next place to look is in the web server's configuration for any redirects. These could have been previously placed in the VirtualHost configuration file for example.
add a comment |
Make sure these two settings in your "options" table are correct:
siteurl
home
From the database admin, you could update them with:
update wp_options set option_value='http://example.com' where option_name='siteurl';
update wp_options set option_value='http://example.com' where option_name='home';
EDIT: If you've already changed these settings, and confirmed that there isn't a .htaccess redirect happening, the next place to look is in the web server's configuration for any redirects. These could have been previously placed in the VirtualHost configuration file for example.
add a comment |
Make sure these two settings in your "options" table are correct:
siteurl
home
From the database admin, you could update them with:
update wp_options set option_value='http://example.com' where option_name='siteurl';
update wp_options set option_value='http://example.com' where option_name='home';
EDIT: If you've already changed these settings, and confirmed that there isn't a .htaccess redirect happening, the next place to look is in the web server's configuration for any redirects. These could have been previously placed in the VirtualHost configuration file for example.
Make sure these two settings in your "options" table are correct:
siteurl
home
From the database admin, you could update them with:
update wp_options set option_value='http://example.com' where option_name='siteurl';
update wp_options set option_value='http://example.com' where option_name='home';
EDIT: If you've already changed these settings, and confirmed that there isn't a .htaccess redirect happening, the next place to look is in the web server's configuration for any redirects. These could have been previously placed in the VirtualHost configuration file for example.
edited Nov 20 '18 at 13:28
answered Nov 20 '18 at 1:16
Richard ZackRichard Zack
1668
1668
add a comment |
add a comment |
Update the options table in MySQL database (in phpmyadmin ...)
Most options are also available in WP admin, but in your case you cannot access wp-admin right now
As site root has nothing in it other than a sub folder... Isn't it should go to error page? why its still redirecting...
– Aamir Shahzad
Nov 19 '18 at 22:36
I have checked wp-options and everything looks good there... when I install a fresh copy of wordpress... mysite.com/wp-admin is accessible and all of its settings but as soon as I hitmysite.com
it redirects tomysite.com/NewSite
– Aamir Shahzad
Nov 19 '18 at 22:38
add a comment |
Update the options table in MySQL database (in phpmyadmin ...)
Most options are also available in WP admin, but in your case you cannot access wp-admin right now
As site root has nothing in it other than a sub folder... Isn't it should go to error page? why its still redirecting...
– Aamir Shahzad
Nov 19 '18 at 22:36
I have checked wp-options and everything looks good there... when I install a fresh copy of wordpress... mysite.com/wp-admin is accessible and all of its settings but as soon as I hitmysite.com
it redirects tomysite.com/NewSite
– Aamir Shahzad
Nov 19 '18 at 22:38
add a comment |
Update the options table in MySQL database (in phpmyadmin ...)
Most options are also available in WP admin, but in your case you cannot access wp-admin right now
Update the options table in MySQL database (in phpmyadmin ...)
Most options are also available in WP admin, but in your case you cannot access wp-admin right now
answered Nov 19 '18 at 22:29
JewJew
212
212
As site root has nothing in it other than a sub folder... Isn't it should go to error page? why its still redirecting...
– Aamir Shahzad
Nov 19 '18 at 22:36
I have checked wp-options and everything looks good there... when I install a fresh copy of wordpress... mysite.com/wp-admin is accessible and all of its settings but as soon as I hitmysite.com
it redirects tomysite.com/NewSite
– Aamir Shahzad
Nov 19 '18 at 22:38
add a comment |
As site root has nothing in it other than a sub folder... Isn't it should go to error page? why its still redirecting...
– Aamir Shahzad
Nov 19 '18 at 22:36
I have checked wp-options and everything looks good there... when I install a fresh copy of wordpress... mysite.com/wp-admin is accessible and all of its settings but as soon as I hitmysite.com
it redirects tomysite.com/NewSite
– Aamir Shahzad
Nov 19 '18 at 22:38
As site root has nothing in it other than a sub folder... Isn't it should go to error page? why its still redirecting...
– Aamir Shahzad
Nov 19 '18 at 22:36
As site root has nothing in it other than a sub folder... Isn't it should go to error page? why its still redirecting...
– Aamir Shahzad
Nov 19 '18 at 22:36
I have checked wp-options and everything looks good there... when I install a fresh copy of wordpress... mysite.com/wp-admin is accessible and all of its settings but as soon as I hit
mysite.com
it redirects to mysite.com/NewSite
– Aamir Shahzad
Nov 19 '18 at 22:38
I have checked wp-options and everything looks good there... when I install a fresh copy of wordpress... mysite.com/wp-admin is accessible and all of its settings but as soon as I hit
mysite.com
it redirects to mysite.com/NewSite
– Aamir Shahzad
Nov 19 '18 at 22:38
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53383433%2fmain-domain-of-wordpress-keeps-redirecting-to-subdomain%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I tried to revert everything but still didn't fix the issue.
– Aamir Shahzad
Nov 19 '18 at 22:26
1
This could be a browser cache issue. Try it in another browser or clear your browser cache.
– CUGreen
Nov 20 '18 at 3:09
Please read Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers? - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions.
– halfer
Nov 20 '18 at 18:16