×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: problem with prefix

problem with prefix 12 years 3 weeks ago #15927

  • matthew albright
  • matthew albright's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
I need to migrate files from what appears to be tables with different prefixes such as wp_1 through wp_6. I tried doing one at a time but it deletes the previous ones when I try. How can I get the pages from all 6 of these prefixes?

Re: problem with prefix 12 years 3 weeks ago #15928

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Matthew,
So you was not using just WP, but WP MU?
Right now we can import the data only from 1 site. We are looking for ways to make it possible not to delete the data in the DB, but this makes the task really complicated and messy. Right now I cannot state for sure that we will ever support such an option.

If you can't use CMigrator because of that I'll understand and I can refund you if you want.
Kind regards,
Daniel

Re: problem with prefix 12 years 3 weeks ago #15929

  • matthew albright
  • matthew albright's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
I am not sure exactly what they have because im new to this. I believe they have multiple installations of WP on the same server just with different prefixes. Is that what wp mu is? Would it be possible to just go through the exported sql code and modify the names of the tables so that the prefixes all match when I import?


Edit: I think we are going to have different joomla installations in different folders so I assume this will fix the problem. Thank you for the fast response to my initial post.

Re: problem with prefix 12 years 2 weeks ago #15934

  • Petar Tuovic
  • Petar Tuovic's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 32
  • Thank you received: 9
Hey Matthew,

If you have still same problem, check out this page, it might help you:

MySql Rename

I guess you will lose a lot of time renaming all tables.
You can actually do something like this, it will save your time:

Go to phpMyAdmin to access your database.
Go to export, leave all default values and press Start. Exporting the database can take a while.
When done, select all code and copy it to notepad (or any other text editor)
In phpMyAdmin, select all tables and delete them
In notepad, do a Search & replace (Ctrl + H). Set the searchterm to 'old_prefix' and change it into your new prefix (Example: jos_). Press "Replace all".
Select everything in your notepad file and copy it. In phpMyAdmin, go to SQL, paste the queries and press Start.

Source: joomlatools

Cheers, Petar

Re: problem with prefix 12 years 2 weeks ago #15935

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Matthew, hey Petar,

I'm afraid that the process won't be that easy. You can of course export the tables, then rename the prefixes. But you will have a problem with the ids.

Let us say that you have the wp1_ and wp2_ tables. They both will contain posts with the id=1. Then, those posts will be related to tags, categories. The tags and the categories can again have the same ids. So it is much more complicated than that.

What I think would be much easier is to import the content from wp into joomla. Then export the content table. Then go ahead and import the wp2 tables.
Export the content etc.

Once you are ready you will have to create manually the sql query to import the content again.
Here in notepad(or your editor) you will have queries like

Import into #__content (fields....)
VALUES
(1,...
(2,...

one and 2 are the ids. You can just replace it with "". Once you are ready. You should drop all the content from the joomla table and insert your merged records.

Then you will have all the content in the db and you will make sure that for example it links to the proper categories.

Still a lot of manual work, but I think faster than merging the wp tables...

Cheers,
Daniel
  • Page:
  • 1
Time to create page: 0.109 seconds