Post by saregas » Wed Feb 12, 2025 2:52 am

Hello!

I am moving my OpenCart website from one domain to another.. but i got some issues.
While the website was on the old domain, I was using 4th Store for my domain, this is i gues from my template i got 4 different stores for different designs so I used the 4th one and in the data base its ID was Store 3... the 1st one was Store ID 0

When i moved the domain the default store was set to the 1st one and its now with the new domain... also on the actual website which was 4th store i change the domain to the new one.. but still the 1st one was the default... so i dont know how to change it..

Also i changed the config files in main folder and admin folder, everything there was fine. Changed in the DataBase oc_store last store with ID 3 the values with the new domain, but i dont see the store ID 0 in oc_store... but in oc_settings i see Coulm with name Store ID and there were 0,1,2,3 recorded settings for all of them

So the website atm is half working... but most of the pictures and codes is redirecting to the old domain: https://healthandfitness.goinfancy.com/ (this is the new domain and live version of the website)

So guys any idea 1) how to properly change the domain so it will be working correctly and 2) how to change the default store???

Attachments

???
stores.jpg

Newbie

Posts

Joined
Fri Apr 27, 2018 3:02 pm

Post by by mona » Wed Feb 12, 2025 3:32 am

I am mostly lost on what the problems are here. Someone else will probably read it more carefully to try to decipher it.

One thing to note is that you have not waited for the Propagation
Propagation is the projected length of time it takes a domain's DNS (Domain Name System) information to be updated across the entire web after a change is made. The process can take 24-48 hours to complete in full.

You can check where your site is up to here:
https://www.whatsmydns.net/#A/healthand ... nfancy.com

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by saregas » Wed Feb 12, 2025 7:20 am

Hello,

I will try to explain it more clearly:

I want to change the domain of an existing website. Its domain has expired long ago. I created for it another cPanel Acc with other domain. Moved the files and Data Base. Changed the Config files in the main folder and admin folder. Also inside the admin panel i changed the URL of the store. But dont know why the default store is 1st one, mine which was working before is the 4th one... so i need to change the default store because of its settings. ALso i changed the URL in the DataBase. But still its not working correctly, thats why i asked what it needs to be done to change the default store in the Admin Settings and how to change the domain properly? So to be working as intended..

Newbie

Posts

Joined
Fri Apr 27, 2018 3:02 pm

Post by by mona » Wed Feb 12, 2025 8:44 am

There are lots of 404s
https://healthandfitness.zendesk.com/embeddable/config
<img data-scr - presumably missing your lazy load so that is why your images are broken
and you are missing some theme css

I am not sure what you have done in the database directly, but this might help you
viewtopic.php?t=27538

Attachments

???
Screen Shot 2025-02-12 at 00.24.31.png
???
Screen Shot 2025-02-12 at 00.31.49.png
???
Screen Shot 2025-02-12 at 00.31.40.png

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by saregas » Wed Feb 12, 2025 4:48 pm

Any idea what might caused it? Do I need to repeat some of the steps of changeing the domain or copying files?

Also whats the correct way to move OpenCart website from one domain and cPanel acc to another to work correctly.. i couldnt find info about that anywhere..

Newbie

Posts

Joined
Fri Apr 27, 2018 3:02 pm

Post by saregas » Fri Feb 14, 2025 9:16 pm

So can someone give a proper way to OpenCart store from old domain and cPanel to new one? What are the correct steps so everything will work as intended? I tryed to find on internet, but nothing specific... and i really need to fix that problem...

Newbie

Posts

Joined
Fri Apr 27, 2018 3:02 pm

Post by saregas » Tue Feb 25, 2025 9:43 pm

Any info?

Newbie

Posts

Joined
Fri Apr 27, 2018 3:02 pm

Post by JNeuhoff » Tue Feb 25, 2025 10:19 pm

saregas wrote:
Wed Feb 12, 2025 4:48 pm
Any idea what might caused it? Do I need to repeat some of the steps of changeing the domain or copying files?

Also whats the correct way to move OpenCart website from one domain and cPanel acc to another to work correctly.. i couldnt find info about that anywhere..
You just copy the database to the new server via e.g. PHPMyAdmin's export and import. And then, using FTP, you download your current OpenCart files and re-upload them to your new server. Finally, update your config.php, admin/config.php and .htaccess (e.g. for the Base). That's it pretty much.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by knowband.plugins » Wed Feb 26, 2025 9:21 pm

Hi,

As per the conversation we went through, we understand that you have successfully moved the Opencart to the new domain, now the only issue is that you are not able to set a different store as the default store in your new domain.

If our understanding is correct, then to make another store the default store in your Opencart, you need to do the below settings:
1. Update the Settings in the Database:
  • Find your Store ID.
  • Update the same in the default store settings. For that, you can use the below query:

Code: Select all

UPDATE `oc_setting`  SET `value` = 'https://yournewstore.com/'  WHERE `store_id` = 0 AND `key` IN ('config_url', 'config_ssl');
2. Update the Store URL in your Config Files
  • Update config.php and admin/config.php
3. Clear the cache from the Admin Dashboard and if you are using some third-party service for the cache then flush the cache from there as well.

4. Update your .htaccess file and set the new store as the default store. Refer to the below code:

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_HOST} ^oldstore\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.oldstore\.com$
RewriteRule ^(.*)$ https://yournewstore.com/$1 [R=301,L]
Alternatively, you can check the documentation of creating the Multi-Store in your Opencart.

Please review the above information and let us know in case of any queries.

Regards,
Knowband Team

User avatar
Active Member

Posts

Joined
Thu Aug 04, 2016 2:56 pm

Post by Elevate » Thu Feb 27, 2025 2:30 am

@KnowbandTeam you don't need to update anything in the database. Update both config.php files and .htaccess only.

ELEV8TE Website Development
Available for hire - please contact me at https://www.elev8tewebsitedevelopment.com/contact
https://www.elev8tewebsitedevelopment.com


User avatar
Active Member

Posts

Joined
Fri Jul 06, 2018 12:40 am
Location - Denver, Colorado, USA

Post by knowband.plugins » Thu Feb 27, 2025 4:29 pm

Thanks, @Elevate, for your response.

As per the requirement, they need to set a different store (with a store_id other than 0) as the default store in OpenCart. This is only possible if the database reflects the new store as the one with store_id = 0. Therefore, modifying the database is necessary to implement this change.

Regards,
Knowband Team

Opencart Plugins: Knowband Store
Email: support@knowband.com


User avatar
Active Member

Posts

Joined
Thu Aug 04, 2016 2:56 pm

Post by JNeuhoff » Thu Feb 27, 2025 7:08 pm

Why do you need a store_id greater then 0 ? Is it a multi-store scenario?

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by knowband.plugins » Thu Feb 27, 2025 8:10 pm

The default store id on the Opencart is always 0, if the store has an ID other than 0 then the same will not be considered as the default store.

Regards,
Knowband Team

Opencart Plugins: Knowband Store
Email: support@knowband.com


User avatar
Active Member

Posts

Joined
Thu Aug 04, 2016 2:56 pm

Post by paulfeakins » Thu Feb 27, 2025 8:57 pm

saregas wrote:
Fri Feb 14, 2025 9:16 pm
So can someone give a proper way to OpenCart store from old domain and cPanel to new one? What are the correct steps so everything will work as intended? I tryed to find on internet, but nothing specific... and i really need to fix that problem...
Some web hosts will do this for free - it's worth asking them.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: Google [Bot] and 12 guests