Unable to login to Wordpress after domain name change - wordpress

I bought a new domain name from GoDaddy and changed the domain name of blog which was hosted in BlueHost. Now I am unable to login to my blog in Wordpress. With my new domain url,
newdomain.com/wp-login.php, I reach the page where I need to enter my username and password. Once I enter the details and press Submit it redirects back to my old domain and gives an "This site can't be accessed error" page
Can some one please suggest how I can overcome this problem as I very new to Wordpress.
Thanks

Try adding the following lines in wp-config.php file:
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
Just replace values with the URL of your new domain.
If that doesn't work, check this tutorial on other different ways to fix this issue, among them
a detailed step by step guide on how to modify those values in a database (solution already mentioned by Ingo Seidel answer).

You need to change The Domain Name in the WordPress
Database. Login to your Provider And search for MySQL myadmin. Open
Your Database and find the dataset "siteurl" and change that
Old one to the new

Related

Wordpress and temporary access url

I hope everybody is well.
I have to set up a new Wordpress site, but this is the first time I need to setup the website "before" the domain name is registered.
I have webspace on shared webhosting and I can setup the Wordpress site using a temporary subdomain for my shared hosting, but this will mean setting up the Wordpress site using the temporary access url instead of the proper domain name that will be done next week.
If I setup the Wordpress site using the temporary url, once the domain name is registered, is simply changing the website address in the Wordpress General settings adequate or will I need to update the database too?
Is there a plugin that will do the above?
Thanks in advance if anyone can assist.
AH
You can proceed and start setting up your WordPress site to start designing, ones you've completed and domain name is registered like you've said, you can:
Backup your File Manager files to a local storage Highlight the content, right click, and click compress then download.
Navigate to the root folder of the now newly registered domain(public_html), and upload the files you downloaded above.
Go to the wp-config.php file, highlight and select edit.
Just before a line with this words /* That’s all, stop editing! Happy blogging. */
Add the lines below then save and close.
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
example.com is the new domain.
Now go back to your WordPress site to update the links. Yes, their is a plugin to update links, a lot of them but search for 'Velvet Blues Update URLs' using the plugins-> Add new.
After installing and activating the plugin,go to Tools -> Update urls, enter your old (subdomain) and new (root domain) URLs and in Step 2, check all options except Update All GUIDs.
Click the Update URLs Now button to proceed.
Check out under FaQs of your hosting provider if they've indicated a method on how users can move sites from subdomain to main domain.

Wordpress migration - Admin panel Issues

I wanted an exact replica of my current wordpress website on a different domain with a different database.
So I created a database in same db host as the original database.I changed siteurl and homeurl in new database to the corresponding new domain.
I dumped the same code to new IP and changed wp_config file i.e. dbname,dbuser and wp_home wp_siteurl.
I kept db_host same as I have both the databases on same host.
I was able to get the replica up on new domain,but I am facing following issue -
whenever I change my password for admin in new admin panel , it gets reflected in my original website database and vice a versa.
Similar thing is happening for advanced custom fields in my admin panels.If I change something in new admin panel,it is reflected on my original website.
What could be the issue?? I think I have followed all the guidelines of wordpress migration to other domain.
Thanks in advance :)
You need to change the domain name in database then only it will solve the redirection issue.
If you have updated database details in wp-config.php file, there is no chance for the issue. First please confirm that both wp-config.php files have different database details like database name, user name & password.
For WordPress database migration between different domains, either use wp-cli command, or some other database migration plugin. An updating wp_home & wp_siteurl in DB is not enough.
https://developer.wordpress.org/cli/commands/search-replace/
https://wordpress.org/plugins/wp-migrate-db/

Redirect shows ip instead of url

I know this question is placed many times, except my situation is different and couldn't find the right answer.
I have a wordpress installed on a path bij direct admin on 123.456.11.11/path.
My domain is registered by a other company and i did a redirect to the ip/path. That was working fine but i had to turn the mask function off because otherwise it wouldn't open a secure https location.
Now the site and the https location is working fine except that it's showing the IP instead of the URL. I wanted to add an A record by the domain hosting but i can't set an A record to a path.
The question is how can i show the url without the mask function and the Wordpress installed on a path?
Thanks in advance!
It is possible that when running the wordpress installation wizard, the url you were using had the I.P address rather than the domain name, i.e http://123.456.11.11/path instead of http://yourdomain.com/path
During the installation process Wordpress saves the url used in the options table and uses it as the base url for future operations e.g. when you create a new post or page, or use the site_url() function to generate a link.
If this is the case, assuming you retained the default table prefix, you will have to edit the wp_options table (using phpmyadmin) and update siteurl and home from the ip based url to the domain name url.
Don't forget to include the path.
This means, using your example:
change the url from
http://123.456.11.11/path
to
http://yourdomain.com/path
If you had created posts and pages you will have to update their paths also. They are found in the wp_posts table.

Wordpress redirection loop

Where can I change manually the website url that is in Settings>General
in wordpress panel?
I have an issue.
I had one wordpress website in the url
79.170.40.53/theffashioneditor.com/test1/
and i wanted to transfer it to
tfeditor.com/test1/
So i packed the files from first domain server
and unpacked them to the second domain server
also did with the DB. Changed the wp-config.php with the new DB user pass and database.
Then when i tried to go to the "tfeditor.com/test1/"
it redirected me to the previous server.
I went to the previous wp admin panel and changed the HOME and URL to the new domain name "tfeditor.com"
and now im in a redirect loop whenever i want to go to tfeditor.com/test1/wp-admin it takes me to the previous domain with this path
http://79.170.40.53/theffashioneditor.com/test1/wp-login.php?redirect_to=http%3A%2F%2Fwww.tfeditor.com%2Ftest1%2Fwp-admin%2F&reauth=1
I login with my username and then it takes me to
http://79.170.40.53/theffashioneditor.com/test1/79.170.40.53/theffashioneditor.com/test1/wp-admin/
Someone can help me with this please?
As I wrote here.
Simple checklist for wordpress migration is:
edit database table wp-options and options siteurl and home there
edit wp-config.php (DB_NAME, DB_USER, DB_PASSWORD a DB_HOST)
use this replace script to replace all other occurences of absolute paths for relative path, it is enough to replace your old site name http://yoursite.com with an "/"

Drupal7 rename domain cannot login

I have a website that was at www.somedomain.com/sub/drupal7 and all was working well.
I purchased a new domain for the site www.newdomain.com
I setup this with my hosting provider as an addon domain pointing to /public_html/sub/drupal7
I can access the site using the new domain and it looks ok, but I am unable to login using the new URL. I can still login using the old URL. I tried modifying base_url with no success.
Thank you
This happens because you probably have a wrong $cookie_domain variable in your settings.php file.
Edit sites/default/settings.php file, and near line 325 - 330, there should be a $cookie_domain that you can change it to .newdomain.com (note the prefixing . in the domain).

Resources