How do I transfer hits to Joomla 4 from J3?

Need help upgrading your Joomla! website or converting to Joomla! 4.x?

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
stuffdone
Joomla! Guru
Joomla! Guru
Posts: 641
Joined: Tue Oct 28, 2008 11:06 pm
Location: NE Florida
Contact:

How do I transfer hits to Joomla 4 from J3?

Post by stuffdone » Tue Jan 31, 2023 4:13 pm

How do I transfer my record of hits from Joomla 3 to a new install of Joomla 4?
--- http://www.Stuffdone.com ---
Wow. Doing web sites for over 25 years now. 75! That's 1/3 of my entire life :)

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13324
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: How do I transfer hits to Joomla 4 from J3?

Post by sozzled » Tue Jan 31, 2023 7:38 pm

What do you mean, "How do I transfer my record of hits from J! 3.x to a new ... [J! 4.x website]?"

If you migrate your existing J! 3.x website, the proper way, using the Joomla! Update component (like other people do), the transfer of your "record of hits" will be taken care of when you have your upgraded J! 4.x site. ;)

I think the real question is, what's stopping you doing things the normal way, isn't it? That's a question only you can answer.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

stuffdone
Joomla! Guru
Joomla! Guru
Posts: 641
Joined: Tue Oct 28, 2008 11:06 pm
Location: NE Florida
Contact:

Re: How do I transfer hits to Joomla 4 from J3?

Post by stuffdone » Tue Jan 31, 2023 9:19 pm

The question may not have been clear. Sorry.

How can I transfer hits to a CLEAN NEW install of Joomla 4 taken from a J3 site.
--- http://www.Stuffdone.com ---
Wow. Doing web sites for over 25 years now. 75! That's 1/3 of my entire life :)

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13324
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: How do I transfer hits to Joomla 4 from J3?

Post by sozzled » Tue Jan 31, 2023 9:31 pm

"hits" ??? "hits" of what, specifically?

It doesn't really matter what "hits" you're referring to. The database tables in J! 4.x are structured differently to the corresponding tables in J! 3.x. You need to migrate/convert/restructure/modify the J! 3.x database tables and then transfer those tables across.

There are at least half a dozen tables that need to be transferred; these include articles, categories, users, among others. And then there are the new workflow tables in J! 4.x. A fair bit of work. All catered for if the old J! 3.x website is migrated to J! 4.x using the Joomla! Update component.

Sure, it's possible to achieve what you want to achieve (if you know exactly what you're doing and you want to do everything by hand). I guess (without knowing what, specifically, you want do to) it could take me a few days if I did nothing and didn't stop to eat or sleep.

I repeat my earlier question: What's stopping you from migrating your J! 3.x website (where you have all these "hits") to J! 4.x using the Joomla! Update component?
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 8527
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: How do I transfer hits to Joomla 4 from J3?

Post by AMurray » Tue Jan 31, 2023 9:40 pm

You would probably need to use an import/export extension. Something that works both in J3 and J4.
https://extensions.joomla.org/category/ ... -a-export/

Take note of those that are J3/J4 (most seem to be J3 only).

Take note also many of these are paid extensions, not free.

But getting back to Sozzled's question, why not just migrate from J3 to J4 with the existing site?

You could also do (what might be) a complicated database query to reset the hit counter to the earlier value (from the J3 site) for all the articles.

In Pseudo code something like (and my programming knowledge is a bit rusty being 1990's turbo pascal and a little visual basic but nothing like PHP or MySQL)

Code: Select all

connect database
Do For
 [each article ID], 
  update [field-hit-counter] to [new-value]
repeat
end DO 
close database
The above is just a concept/idea - I'm just saying it's possible a PHP script could be written to execute a SQL query to update the database values for each article record hit counter (or the MySQL query itself directly within a database tool like PHPMyAdmin), but I'd try one of the import/export tools first.
Regards - A Murray

stuffdone
Joomla! Guru
Joomla! Guru
Posts: 641
Joined: Tue Oct 28, 2008 11:06 pm
Location: NE Florida
Contact:

Re: How do I transfer hits to Joomla 4 from J3?

Post by stuffdone » Sat Feb 18, 2023 5:19 pm

Thanks. I was just trying to experiment with wiping entire site and doing a clean install of J4
--- http://www.Stuffdone.com ---
Wow. Doing web sites for over 25 years now. 75! That's 1/3 of my entire life :)


Post Reply

Return to “Migrating and Upgrading to Joomla! 4.x”