When you have a large number of blogs to look after, it can be a challenge to keep on top with security updates for plugins and WordPress Core. At the same time the bad guys are getting faster and faster to exploit these kinds of holes.
For that reason I like to keep all of my blogs in a WordPress Multisite installation. Sites share users, WordPress core and plugins and database. They still have their own database tables and upload folder.
Sometimes I start with a simple WordPress install because I'm not sure, how the site will later be used. After a site has consolidated I'm importing the content into my multisite installation for easier administration.
Here are some steps to follow, when doing this. I got some ideas from here but would like to share my experience to save someone else some time.
- Export the original site's database tables. Skip the tables wp_users and wp_usermeta.
- Create a new, empty blog in your WordPress MU installation. Note the ID of the new site.
- Open the .sql file you got from step 1 and rename all the tables from wp_xxx to wp_ID_xxx. E.g. wp_options becomes wp_20_options.
- Find and replace all the file paths. /wp-content/uploads/2014/xx.jpg becomes /wp-content/uploads/ID/2014/xx.jpg
- Confirm you really renamed ALL the tables in the .sql file. You really want to avoid overwriting stuff in you MU installation.
- Import the old blog's .sql into your WordPress MU database
- Navigate to wp_ID_options. Rename wp_user_roles to wp_ID_user_roles. This prevented me from adding new users.
- Copy plugins, themes and media files to WordPress MU. Generally files are uploaded to /wp-content/uploads/ID. If this folder doesn't exists, just create it.
That's it. After those steps, the blog should look exactly the same as before. You can continue by adding some users. If someting breaks, it might look ugly. Just keep a cool head and re-trace the steps to find the error.