Support Forum

How to move forum to a new site with an existing WP installation

CB Christine Baker
Christine Baker
Member

I’m combining two sites and I want to move the forum.  I’ve looked at https://simple-press.com/documentation/codex/faq/problem-with-post-edit-buttonow-to/problem-with-post-edit-buttonow-to-move-sp-to-a-new-server-or-domain/

Simply ensure that all of the Simple:Press database tables are moved alongside those of your core WordPress. The Simple:Press tables are all prefixed with ‘sf‘ (following your own database level table prefix).

I have NO idea what to do.

I have imported blogs into multisite installs and imported data into all kinds of forum software, but I’ve never simply ensured that all database tables were moved.  Don’t have the slightest clue how to do that.

Thought I’d install Simple Press on the site I want to move it to and then simply import the data with some plugin.  I noticed that I can import OTHER forums’ data, but what about Simple Press?

Feel like I’m sitting on my brain …

13 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

I guess I have always tended to be a little hesitant about trying to automate such a process because, let’s face it, it can go wrong and often people will use such a tool without realising the implications or what it is actually going to do and then blame us for the result!

It is actually surprisingly easy. The main problem would come about if the WordPress table prefix was different on the source and target databases. If they are the same then simply using an export and import in a tool such as phpMyAdmin will do the trick.

So the first option is that I could talk you through how to do that and it really is quite straightforward.

The second option would be that I could write you a script that you could run in your database – again fairly simple but will take longer as I probably wouldn’t be able to do that until early next week.

And both of those options assume that your source and target websites have access to the phpMyAdmin tool. It would be most unusual for them not to have as it is commonly bundled with your hosting control panel.

CB Christine Baker
Christine Baker
Member

I just looked at both databases in phpMyAdmin and the prefix is wp_ , so that should be ok.   They’re both multisite installs, but the forum is part of the main blog.

I’m always up for learning something new, never messed with tables before.   So do I just export all the tables with wp_sf and then import at the new site (after backing up)?  And then follow the instructions at “If you need to move your Simple:Press installation to a new domain”?

Thanks!

IK Ike
Ike
Member

Yes – if you are moving just the database from one install of SP to another (as you said you have installed SP again) and your database prefix is the same, you should be good to go with the export / import.

CB Christine Baker
Christine Baker
Member

SP isn’t installed yet on the destination site, but that’s what I had planned on doing.

I suppose I also have to install all the plugins before importing the tables?

MP Mr Papa
Mr Papa
Member

are you importing plugin data? if so, yes… otherwise it will try to install the add on plugins from fresh…  of course, if you imported a backup after that, it would probably work fine too…  but have data set up first is usually best…

CB Christine Baker
Christine Baker
Member

Ok, I finally worked myself up to installing everything on the new site, I exported all the wp_sf tables at the old site and then tried to import the file.   Got this error:

Error
SQL query:

MySQL said:

#1062 – Duplicate entry ‘1’ for key ‘PRIMARY’

What do I do now?

YS Yellow Swordfish
Yellow Swordfish
Member

It sounds like the target table already has data in it. The target tables need to either be empty – or -more commonly – the import SQL script needs to drop the target table and then recreate it before inserting the data.

The easiest way is when you export your data from the source database to make sure you include the DROP table option and also ensure you export both data and structure.

CB Christine Baker
Christine Baker
Member

Ok, I tried this again:

#1044 – Access denied for user ‘desert’@’localhost’ to database ‘lakemead_wp’

What do I need to do now?

Appreciate your help!

YS Yellow Swordfish
Yellow Swordfish
Member

We can not possibly help you diagnose why your user is denied access to your database I am afraid. That is going to be down to you and your mySQL server and it refers to your database access user not the wordpress user.

I am not sure what your last post said originally but it seems it had an image and different text so if there is anything else related to WP or SP that might help I don’t mind looking at the evidence but this message is way beyond our help.

CB Christine Baker
Christine Baker
Member

I’m thoroughly confused.  The documentation says “Simply ensure that all of the Simple:Press database tables are moved”

So what do users have to do with moving tables?

I really don’t know why I can easily import from OTHER forums, but not from Simple Press.

I edited my last post several times as I tried different things and got different error, didn’t want to waste your time on solved problems.

Obviously I have different users on the two sites.  I don’t get why it matters since I’m only importing a few tables. 

Database ‘lakemead_wp’ is the old site, “desert” is the user on the new site.

Is moving a forum from one site to another something that can’t be done?

YS Yellow Swordfish
Yellow Swordfish
Member

Your users write topics and posts in the forum. So if you move the forum data (groups, forums topics etc) then it is also important to move the user data at the same time otherwise all of the posts will lose the information about who posted what. Even worse – if there are different users set up on the target site some of those user IDs might match IDs from the source site but belong to different users. So you will get forum posts being attributed to the wrong people.

Moving a forum to a different site is possible but it makes it difficult if the new site already has user data because of the above.

CB Christine Baker
Christine Baker
Member

Now I’m even MORE confused!!!

I only installed the forum on the new site because I thought that’s what I was supposed to do.  I spent hours downloading and installing the forum and all the plugins. 

I’ll be glad to uninstall the forum if I just can get the forum finally moved.

Maybe you could read through this thread again and tell me what went wrong. In summary, I have two sites which I want to combine. One site has the forum and it has to be moved to the other site. 

Regarding the user error, I thought that selecting all “wp_sf” tables would include the user data.  Obviously the forum I installed has me as user too, but since I haven’t posted anything and all sf_ data should be overwritten by the import, what is the problem?

#1044 – Access denied for user ‘desert’@’localhost’ to database ‘lakemead_wp’

That looks to me like WordPress is trying to access the database at the old site, I have no idea why or what that has to do with importing tables.  But then again, I’ve never imported any tables. Attached is the .maff of my export settings, I’m guessing something’s wrong.

MP Mr Papa
Mr Papa
Member

the problem with combining sites is that we rely on the wp site for its users and those belong to wp…  so you must also move the users to the old site, not just the forum… otherwise, posts have no tie to users…

wp keeps user data in its own tables, namely wp_users and wp_usermeta… though your prefix might be other than wp_

it gets even worse if you merge two sites, because user ids might already be in use on the destination site such that the user ids for users from the old site wont match… so they wont own posts…

remember, simple press does not have any users…  they belong to wordpress…