Part Two: Importing your old blog into your new blog
This can be tricky. It requires FTP access to your server either via an FTP program else via your server’s File Manager. I generally use my server’s file manager.
- Use your FTP manager or host provided File Manager to upload and extract the Plugin zip file to /wp-content/plugins/ and your Theme zip file to /wp-content/themes/ of your root Multi Site domain. Do not activate your plugins just yet. Take care not to overwrite customized plugins and themes (rename them if you need to).
- Login to your WordPress Multi Site (main domain).
- Go to Appearance>Themes>Network Themes (it is a link at the top of the page). Enable the themes for network wide use.
- Go to Super Admin>Sites and create a new site. Use a name other than the name of the site being imported. For example, if you’re importing from old.domain.tld then you could create a Multi Site site called new.domain.tld but not old.domain.tld (we will change the Multi Site site’s name to the original subdomain site’s name in a later step).
- Still in the Super Admin panel, hover your mouse cursor over the name of the site you just created and click “Backend”.
- Go to Posts then trash the welcome post.
- Go to Pages then trash the About page.
- Go to Links, select them all then delete them all.
- Go to Themes and activate the theme used in the old site.
- Go to Settings and set General, Writing, Reading, Discussion, Media, Privacy and Permalinks to the way they are configured in the old site.
- Go to Plugins and activate the plugins used in the old site.
- Mirror the old site’s plugin settings (see part three).
- Go to Appearance>Widgets then position and configure any widgets as they appear in the old site.
- Deactivate the autopinger built into WordPress. Delete the list in Settings>Writing>Update Services (back it up first!).
- Install Cimy User Manager and use it to import your user data. Be aware that user passwords might change.
- If you have hotlink protection setup on your server, disable it.
- Go to Tools>Import.
- Click WordPress to install the WordPress Importer.
- Click “Activate and run”.
- Browse for the XML file downloaded when you exported your single WordPress subdomain site’s content. If you created several Export files you should import them all, individually.
- Click “Upload File and Import”.
- Wait a minute for the file to upload…
- Follow the instructions provided. Be sure to tick the bottom box “Download and import file attachments”.
- When the file is successfully imported you will receive an “All done. Have fun!” message at the bottom of the importer page.
- If you created multiple export files repeat steps 17 through 22 until all Export files have been imported (aren’t large sites a pain?).
- Use PHPMyAdmin to export and import plugin specific tables: view the database for the old site, click the Export tab, select only those tables that relate to specific plugins (e.g wp_polls, wp_topposts; do not export WP_Options; do export WP_links if you want to copy your old sites blogroll links), click Go at the bottom. View the Multi Site database, workout which table prefix is for your new site then use a text editor to find and replace WP_ with WP_[number]_ (replace [number] with the new site’s database table prefix number). Next, still viewing the Multi Site’s database, click import and import the edited database export file. Always backup your database before you import into it. You might need to import tables one at a time. If you get an import error, drop the table that’s causing the error (from the new site’s database) and import it again.










Thanks. I gave your post a plug here: http://forums.digitalpoint.com/showthread.php?t=1846977
I’m sure a lot of people will want to get up to speed on this soon.
Thank you Marketing Guy, I really appreciate it, I took a look, every plug helps :-)
Just a few additional points:
1, After each export file has downloaded, open it with a text editor (Kate, Gedit or Notepad), scroll to its bottom and ensure there isn’t an error message. If an error message exists, check the date of the last entry in the file then re-export your blog’s content from that date onwards. Check the new file too;
2, Sometimes the export/import will fail for other reasons. One likely candidate is the script execution time limit set in your server’s php.ini file. Try increasing it to 120 from whatever it is currently set to (prob. 30). The line in your php.ini file to edit is “max_execution_time = 120;”. Be sure to change it back after you have completed your blog transfer;
3, you can transfer your blog by importing the old blog’s database tables into your new blog. I will write instructions for this sometime soon.
I will add the above information into the main article when I next edit it.
hi,
i enjoyed reading your article, excellent information. i am running wp mu 2.6.5 and would like to upgrade directly to 3.0 but i’m worried that i will run into trouble.
do you think it is possible to do a one step upgrade (ommitting wpmu 2.7 2.8 and 2.9) to wp (mu) 3.0?
i’m only running 5 subdomain blogs on the mu installation, but it would be great if i don’t have to export and re-import databases manually.
thanks for help in advance
Hello Ralph, I honestly don’t know. I would install the WP Database Manager plugin, use it to repair and optimize the database before backing it up, copy the WP MU blog’s directory to a backup directory above /public_html/ (i.e create /backup), use PHPMyAdmin to create another database backup (just to be sure) then I would try the upgrade. If anything goes wrong you would thus be able to restore the copied files and restore your database.
The best place to find the answer to you question is the forum at wordpress.org. The support might be slow there but they do eventually answer.
Ralph, I’ll do some research for you and post another reply later.
Someone knows how to create again a virtual subdomain that I deleted due to a mistake?
as I know it is not possible to create again a subdomain in wordpress 3
please, some help
Thanks!
Does the deleted site’s database tables still exist? Do you have a backup of your Multi Site’s database? Many host providers automatically backup their customers’ databases, either get them to restore it or ask them for a copy of it. A restored database will not contain site updates since the backup was created. I’ll provide more assistance once you tell me what you’ve done to get the database back.
I have the database ok.
in wordpress 3 I created a virtual domain like barcelona.mydomain.com then I deleted it. and now I want to create it again but wordpress does not allow me unless I reinstall wordpress again.
Any solution?
Many thanks!
WordPress will usually let you re-create a domain as many times as you need provided it doesn’t already exist. It seems that the old domain name is still registered within your database. My suggestion is this (remember to backup/export the affected tables first). Access your database via PHPMyAdmin, click the Search tab, enter the subdomain name part of your deleted site (i.e. Barcelona), select all tables then run the search (click Go). You will then be presented with a list of tables; browse (use right-click, open new tab) the ones that contain your search string and manually remove references to the deleted subdomain. The data I would remove would be the result returned for wp_blogs and the one for wp_options. Most other tables will be the ones specifically created to for that particular blog’s use.
Thanks for your answer!.I created a real subdomain and then deleted it. Thats why now my virtual subdomain doesn’t work as you said (works dashboard but not the site)
It seems for me not easy as I don’t have experience in PHPMyAdmin, but I have to try it!
Thanks again
Searching tables but It seems ok for me, Nothing in wp-blogs or wp-options. only some tables in slimstat folder. maybe this is not the way but thanks for your answer!
I apologize for replying so late. I misunderstood your original problem. Recreate the real subdomain and the virtual subdomain will begin working again. I had similar issue with one o my domains. I wrote bout it here.
Oh!! thanks
I use google chrome and…
I try it with explorer and its working!
All this headache and was only a Chrome issue.
The other browsers are ok! I don’t know but with chrome I cannot see the site it redirects me to a plesk site…
thanks
I ran into an issue with steps 4 and 5 in your instructions. I am able to complete step 4 and create my new site as newblog.example.net, which is different from my previous site which I am migrating into as instructed.
The trouble is when I hover and click on “Backend” of the site I just created at newblog.example.net, it seems to be looking for the wp-admin file from a WP install that doesn’t exist yet. Where am I going wrong here? Did I miss a step or did you forget something in the instructions? Plz help!
Thanks
4. Go to Super Admin>Sites and create a new site. Use a name other than the name of the site being imported. For example, if you’re importing from old.domain.tld then you could create a Multi Site site called new.domain.tld but not old.domain.tld (we will change the Multi Site site’s name to the original subdomain site’s name in a later step).
5. Still in the Super Admin panel, hover your mouse cursor over the name of the site you just created and click “Backend”.
Hello RJ, does the subdomain site load when the frontend is browsed? Also, create another subdomain site and test whether you get the same reaction.
I was trying to move the theme from http://www.domain.com/wordpress to http://www.domain.com and deleted the “/wordpress” part from the backend “wordpress URL”. (all in wordpress) Now, I can not log back in to fix the problem. Do you have any suggestions?
Thank you in advance!
I’m not quite sure what you’ve done. I think you’re telling me you have deleted the files held in the domain.com/wordpress directory (the whole directory). If that is the case then you will need to either look in your deleted items folder to restore it or you will need to contact your web host and ask them to restore their most recent backup. Your web host might be able to restore that specific directory; if not you will lose any changes made to everything but your database unless the database is restored too. If you ask your host to restore the back up, be sure to ask what changes will be made so you can at least prepare for them. It is always a good idea to back up your database before a restore. Have emailed you as well.
An alternative would be to re-upload WordPress and edit the config.php file to configure the database username, password and location. Thought that would not restore any data uploaded to your WordPress installation.
WP’s import/export plugin doesn’t include settings, user data, plugin data, etc, so I worked out a different process that will migrate everything by tweaking and copying the database tables directly. I wrote up a detailed description if anyone is interested.
Ian, I read your process and I agree that it is a better (though much more complex) approach. I have read and used similar approaches in the past and intended to write an article about database migration not long after writing this one but I didn’t get around to it. Thanks for letting us all know about your article. I’m sure JournalXtra’s readers will find it interesting.
Thanks so much for a really thorough and helpful post. So useful.
Nice work!
::-)
Thanks Henry, it’s nice to be appreciated. I followed your website through to the Back to the Future games you worked on. The games were fun and the artwork good :-)
Thanks you… you are a real true contributor to the WordPress community.
WordPress Multi Site subdomain (and subdirectory) sites all use the same database as the parent (non-subdomain) site. It is possible to give them a database of their own and I will explain how to do that in a later article.
It is indeed possible but I don’t advise it.
The WordPress database table has record names that look something like this: wp_options, wp_posts, wp_comments… (I’ve not checked those names for accuracy). Additional sites on the network use the same database table but their records have names that look similar to these: wp_1_options, wp_1_posts, wp_1_comments… The number represents the numerical ID of the blog/site within the Network. Though it’s possible to use separate database tables, each with its own login details, not all plugins use separate records per site.
For example, The Multipress plugin installs one record as wp_multipress. That same record is used for all blogs/sites on the network. It uses a field within the record to store the site/blog’s ID.
wp_1_options => data, data, data
wp_1_comments => data, data, data
wp_1_posts => data, data, data
wp_options => data, data, data
wp_comments => data, data, data
wp_posts => data, data, data
wp_multipress => data, data, data
So, although it is possible to use separate database tables, it’s not necessarily advisable unless you can be sure that the plugins used by a particular site/blog in the network uses separate records for each site/blog that has its own database.