i am redirected to another site on successful login - wordpress

i recently took over a wordpress site that is a sub dormain of an eCommerce site.
i have installed it on my local wamp and i now wish to log into the wordpress dashboard.
the problem is that the once i log in to wordpress it redirects me back to the old site.
i am now trying to work out where the redirect functionality might be located.
i have already changed the base url address in the table wp_options.
within this table i changed both the siteurl and the home.
i also tried changing the wp-config.php file with the new url:
define('WP_HOME','https://yourdomain.com');
define('WP_SITEURL','https://yourdomain.com');
i would appreciate any ideas on where the redirect functionality might be located.

Related

Can't access wordpress, not even through cpanel

So, I'm making this wordpress website.
I've got full access to the entire cPanel.
I install wordpress, and the domain is always redirecting me to this stupid page.
Here you have the public_html folder.
And when I try to access the Wordpress Admin panel through cPanel, it gives me this random link and redirects me back the page I meantioned earlier.
Any help?

domain redirecting to localhost/wordpress

this is my first time, I am installing a wodrpress localhost(xampp) to main server.
According to tutorial I Imported database from local machine to main server. Changed the the table prefix and http://localhost/wordpress to https://example.com.
after installing theme domain shows empty theme.
I changed all the http://localhost/wordpress used on theme. But didn't work.
Then according to another tutorial I imported full localhost wordpress file.
Then It redirecting my domain to http://localhost/wp-wordpress. Then I decided to fully reinstall the wordpress and as per I removed file from public html which I uploaded.
Now my domain redirecting to http://localhost/wp-wordpress after removing files I uploaded.Public html folder
my site
After reinstalling wordpress on server admin dashboard working fine but domain redirecting to localhost/wp-wordpress
You can change the url many ways in wordpress. You can use to change the url as you understand and follow the steps as I mentioned in below,
Change WordPress URL in Admin Dashboard
Change WordPress URL in wp-config.php File
Change WordPress URL Directly in Database
Change WordPress URL With WP-CLI
Get More understanding the details, Follow the article - How to Change Your WordPress URL
Thanks!
After checking wp-config.php and site_url,home_url in wp_options table in database. Take a view on .htaccess file too. This file should look like this htaccess code
Please change the site_url from the wp_option table. There are 2 rows containing the website base url in the wp_option table. You need to change both url to the main domain url.
Thank you

404 after changing URL in wordpress?

I wanted to make a website for my dad on his birthday. He already had one active through one.com with the URL www.virumfarveogtapet.dk.
I made one with wordpress on the URL test.virumfarveogtapet.dk and when I decided for it to be nice enough to go live I changed the URL with wordpress to the actual www.virumfarveogtapet.dk.
When i try to log into it www.virumfarveogtapet.dk/wp-admin it gives me this error
Not Found
The requested URL /wp-admin was not found on this server.
And if I try to access the website through www.virumfarveogtapet.dk it refers to my dads old homepage.
When I go into wordpress it still stands as test.virumfarveogtapet.dk but when I click it, it refers to my dads old homepage also.
It seems you have changed the URL of the WordPress installation to http://www.virumfarveogtapet.dk/.
You may be able to login and change the URL back to the "test" subdomain here: http://test.virumfarveogtapet.dk/wp-login.php
If not try updating the site URL with via FTP in wp-config.php or functions.php as per the docs: https://codex.wordpress.org/Changing_The_Site_URL#Edit_wp-config.php

CNAME links to WordPress blog but redirects cgi-sys/defaultwebpage.cgi

I've got IIS hosting site(www.site2.com) and wanted to add wordpress blog site on this website, but wordpress is PHP based so I used a tricky way.
I've got PHP hosting site(www.site1.com) so set up self-hosted wordpress blog on this site then adding CNAME on site2.com domain, I believed it should work.
So, installed wordpress in PHP hosting site(cpanel hosting) and create blog site on this wordpress, the url is www.site1.com/blogb. Then created subdomain from cpanel(blogb.site1.com) which linked to www.site1.com/blogb as root folder.
When I go to blogb.site1.com, it's working so good.
One last thing what I did is adding CNAME from site2 zone manager.
blog.site2.com -> blogb.site1.com
I think this should work because blogb.site1.com is working properly.
But when I go to blog.site2.com, redirected to "/cgi-sys/defaultwebpage.cgi" page then showed "SORRY ... If you are the owner of this website, please contact your hosting provider" message.
I cleared cache from my browner and tried from other browser but didn't work.
And added rewrite rule on .htaccess file on site1.com root folder but nothing worth.
I checked site URL from wordpress settings page, the site address(URL) was "blogb.site1.com" which was correct.
I believe if destination url of CNAME is working, the CNAME should work.
But when I try to access a file in destination folder using this url, blog.site2.com/readme.html, returns 404 not found while blogb.site1.com/readme.html is working.
So, CNAME(blog.site2.com) seems be pointing wrong directory.
Is there anything I missed or did wrong?
Thank you,
B

Not able to change Wordpress site url - users being logged out

A client had a problem that the users was logged out after only minutes of inactivity. And wordpress telling that .htaccess wasn't writable(which it was). I checked the wordpress site url and home url and it turned out that the wordpress site url had www including in the url, while the home url didn't. I tried changing the wordpress site url to include www, but it was set back to not including the www when I reloaded the page.
The solution to the problem was that I had to define the the site url and home url in wp-config.php. After that Wordpress stopped complaining about .htaccess not being writable and users was not logged out.
define('WP_HOME','http://www.mysite.com');
define('WP_SITEURL','http://www.mysite.com');
Anyone know why this happened all of a sudden? And why didn't Wordpress let me save the wordpress home url from the admin interface?
Were there any changes made to the Database of the site recently?
The home and site url's are also stored in the wp_options table in the DB and can be manually changed from PHP myadmin if required...

Resources