• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

Need Suggestion Related To Database In Manual Domain Name Change/Migration?

Iron-Man

Active member
Babiato Lover
Oct 9, 2019
304
87
28
29
India
Hi friends, I generally migrate my websites/domain manually (Not use any tools). My websites are mostly wordpress.

This is my technique. I create the new domain via c-panel settings. Inside file manager, I copy all files from old domain folder to new domain folder. Then I create new database for the new domain. Then download the old database & use notepad++ to replace old domain name with new domain name. Then upload the new database related to the new domain. Then check all fine in wp-config file like right username & passwords etc. All become fine.


This is my Question.

While replacing domain names in the database via notepad++; I noticed that there are some data related to old domain file manage path present. For example; if this is my old domain: old-domain.com. Then in the database, this file path: public_html/Old-Domain.Com is present. I tend to forget replacing it & only replace the domain names🤣.

So should I replace the file path too?

Also is there anything else I should replace in the new database?
 
My question is why you struggling went you can just use a plugin?

Duplicator will do the work for you in minutes 🤷‍♂️

regarding to your question since you are doing it manually yes you have to change path manually too
 
  • Like
Reactions: Iron-Man
My question is why you struggling went you can just use a plugin?

Duplicator will do the work for you in minutes 🤷‍♂️

regarding to your question since you are doing it manually yes you have to change path manually too
Dear friend, Thanks for reply. I know there r many plugins; but due to some personal reasons😜 I prefer doing it manually.

So you mean I should replace the file path too. Thanks.

Is there anything I should replace?
 
:rolleyes:....:unsure:...sorry bud, but either you are bored or simply put us to the test :ROFLMAO:
 
:rolleyes:....:unsure:...sorry bud, but either you are bored or simply put us to the test :ROFLMAO:
No brother😜, I guess you might misunderstood me. Recently I did 2-3 website name changes via my own method. Yesterday when I check notepad++ search option to find any residual data, I realized there are file name path present of old domain🤣. Then I realized I might have done some mistake. Thus asking here.

I hope you understand now.
 
I migrate WP websites regularly and I use the following script after the website has been moved to a new host:

SQL:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
 
  • Like
Reactions: Iron-Man
I migrate WP websites regularly and I use the following script after the website has been moved to a new host:

SQL:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');

Thanks for answer brother. I have 2 question; plz answer in your free time.


1) How to use this script? I think there might be some options inside the myphpadmin. If this is possible, then it will be more easier method than using notepad++ to replace domain name.


2) You did not change the c-panel file manager path as I think it will be still present inside the database (Even if the new domain website run very well). Is there any such script?
 
I keep asking my self why you struggle I know you mention it personal but a plugin can do the heavy load, updraft and duplicator offer encryption to the backup if its that what your afraid of and you will do everything with one click. 🤷‍♂️
 
  • Like
Reactions: Iron-Man
I keep asking my self why you struggle I know you mention it personal but a plugin can do the heavy load, updraft and duplicator offer encryption to the backup if its that what your afraid of and you will do everything with one click. 🤷‍♂️

Dear, I understand your recommendation to use a plugin😊. And I agree that it will be great to use it instead of struggling to do everything manually. Also, truly speaking, I am not doing everything manually but using Softaculous's import feature to migrate the website. It does everything smoothly, like moving files & databases without my having to download them👌.

Now, please see things from my point of view🙏. This is my situation. I use multiple C-panel accounts. Among them, I use one for my own testing (where I create demo websites, etc.) and use another for keeping the client's website.

Suppose today I got a client order for an e-commerce website. So first, I made the website in my testing Cpanel account with my own subdomain. When it is ready, I go to the other cPanel account. There, I use Softaculous' import feature to import the website to the main domain. After this, the new site also works very well. But there is a catch.

After a successful import, I make a backup of the new site in the c-panel. Then download the database. There, I found that some parts of old subdomain were present even though the site was working great. So I used to just replace all the domain names using the technique of "download database, replace domain, delete database, & import".

But a few days ago, upon further checking, I found that there were also old C-panel paths still present. So I thought I should replace some other things too. That's why I started this thread to get advice from database experienced persons.

And regarding your plugin recommendation, I tried it a few months ago. But it did not work well for me. May be I was using the wrong version of plugins or using the wrong settings, but it seems complicated for me while the Softaculous method was super easy for me. I can even easily transfer any site from one hosting company to another using Softaculous. I can transfer from one c-panel to another easily too. But I just need to correct some files in the database.


So dear, I hope you understand my point of view. I will welcome any more advice from you.😊😊


Thanks & Regards.
🙏🙏🙏🙏🙏🙏
 
Dear, I understand your recommendation to use a plugin😊. And I agree that it will be great to use it instead of struggling to do everything manually. Also, truly speaking, I am not doing everything manually but using Softaculous's import feature to migrate the website. It does everything smoothly, like moving files & databases without my having to download them👌.

Now, please see things from my point of view🙏. This is my situation. I use multiple C-panel accounts. Among them, I use one for my own testing (where I create demo websites, etc.) and use another for keeping the client's website.

Suppose today I got a client order for an e-commerce website. So first, I made the website in my testing Cpanel account with my own subdomain. When it is ready, I go to the other cPanel account. There, I use Softaculous' import feature to import the website to the main domain. After this, the new site also works very well. But there is a catch.

After a successful import, I make a backup of the new site in the c-panel. Then download the database. There, I found that some parts of old subdomain were present even though the site was working great. So I used to just replace all the domain names using the technique of "download database, replace domain, delete database, & import".

But a few days ago, upon further checking, I found that there were also old C-panel paths still present. So I thought I should replace some other things too. That's why I started this thread to get advice from database experienced persons.

And regarding your plugin recommendation, I tried it a few months ago. But it did not work well for me. May be I was using the wrong version of plugins or using the wrong settings, but it seems complicated for me while the Softaculous method was super easy for me. I can even easily transfer any site from one hosting company to another using Softaculous. I can transfer from one c-panel to another easily too. But I just need to correct some files in the database.


So dear, I hope you understand my point of view. I will welcome any more advice from you.😊😊


Thanks & Regards.
🙏🙏🙏🙏🙏🙏
Well your still struggling
Here the easiest way

1. On your testing site after your done with the demo or the new site backup with duplicator, you only get 2 files the installer and the zip folder

2. On you Cpanel add a the new domain or subdomain and this will create a new path and dns for that domain or clients domain

3. Drop the two files in the public folder and follow the installation

4. done you website is imported clean and no struggle

Ps: I been migrating website for over 8 years
 
  • Like
Reactions: Iron-Man
Well your still struggling
Here the easiest way

1. On your testing site after your done with the demo or the new site backup with duplicator, you only get 2 files the installer and the zip folder

2. On you Cpanel add a the new domain or subdomain and this will create a new path and dns for that domain or clients domain

3. Drop the two files in the public folder and follow the installation

4. done you website is imported clean and no struggle

Ps: I been migrating website for over 8 years
Wow...is this that's easy. I am surprised 😯 really...Are you sure there will be no need for database change and all will be fine..
 
Wow...is this that's easy. I am surprised 😯 really...Are you sure there will be no need for database change and all will be fine..
Database will be imported all you need is the credentials that duplicator will ask
 
Ok, let me check this out today. I have a very important website migration work today. I Will use your trick. Plz send me the right version of this duplicator plugin♥️🙏.

If this works, then it will really save a lots of my time. It takes almost 30+ minutes for me to migrate a 250 mb website😭🤣🤣🤣 + the headache of database replace bullshits 🤣 (export+drop+replace via notepad+ import & wait + test...these over work will be gone forever
.haha.)...
 
Ok, let me check this out today. I have a very important website migration work today. I Will use your trick. Plz send me the right version of this duplicator plugin♥️🙏.

If this works, then it will really save a lots of my time. It takes almost 30+ minutes for me to migrate a 250 mb website😭🤣🤣🤣 + the headache of database replace bullshits 🤣 (export+drop+replace via notepad+ import & wait + test...these over work will be gone forever
.haha.)...
Just search it here Duplicator Pro

Let me know if you need help feel free to PM me
 
  • Like
Reactions: Iron-Man
hello hello brother!
I'm sorry, but I'd like to make a suggestion from you. I'm creating an online photo gallery and I've chosen to use a script here. But after working for 3 days, it seems that the script has a virus so it doesn't work anymore!
I would like you to recommend a WordPress theme here that is at least clean and can be easily adapted for a gallery site.

Thank you for any answer.
Dear brother. Plz delete this msg. And create a new discussion thread. There is an important discussion happening in this thread.
 
Well your still struggling
Here the easiest way

1. On your testing site after your done with the demo or the new site backup with duplicator, you only get 2 files the installer and the zip folder

2. On you Cpanel add a the new domain or subdomain and this will create a new path and dns for that domain or clients domain

3. Drop the two files in the public folder and follow the installation

4. done you website is imported clean and no struggle

Ps: I been migrating website for over 8 years
One doubt. Do I have to upload the download package in the new domain folder. Is there any cloud or FTP way of migration (Like in Softaculous I do not need to download, migration happen via FTP)

P.S: Dear, Is it safe to discuss here or I should PM you?😊
 
Last edited:
One doubt. Do I have to upload the download package in the new domain folder. Is there any cloud or FTP way of migration (Like in Softaculous I do not need to download, migration happen via FTP)

P.S: Dear, Is it safe to discuss here or I should PM you?😊
Pm me better
 
Thanks for answer brother. I have 2 question; plz answer in your free time.


1) How to use this script? I think there might be some options inside the myphpadmin. If this is possible, then it will be more easier method than using notepad++ to replace domain name.


2) You did not change the c-panel file manager path as I think it will be still present inside the database (Even if the new domain website run very well). Is there any such script?

1) Copy the script into the SQL tab in phpadmin, and execute the script.

2) One would need to know the DB tables referencing the c-panel path and create a script similar to the ones above.
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock