Migrovať WordPress do WordPress MU nie je také jednoduché ako sa môže na prvý pohľad zdať. Zmigorvať databázu väčšiu ako 1.4MB je problém. Trochu som googlil, až som narazil na tento článok:
http://welcome.totheinter.net/2008/10/04/how-to-migrate-from-wordpress-to-wordpress-mu/
Postup je skvelý, až na pár drobností. Zostane pár vecí ktoré treba ponastavovať. Ja som však migroval 40 blogov a nechcelo sa mi to nastavovať po jednom po migrácii. Preto som si postup trochu tweakol.
V prvom rade je potrebné po ištalácii WordPress MU nakopírovať všetky pluginy a témy. Ak budete používať na všetkých blogoch rovnakú tému, tak všetky ostatné témy zakážte a nechajte iba tú jednu tému. Tým zabezpečíte, že všetkým blogom bude prednastavená práve tá vaša téma. Až potom vytvárajte blogy.
Pre tých čo máte root práva na databázu uľahčím migráciu tabuliek:
use DB_NEW;
truncate table wp_1_links;
truncate table wp_1_postmeta;
truncate table wp_1_posts;
truncate table wp_1_terms;
truncate table wp_1_term_relationship;
truncate table wp_1_term_taxonomy;
insert into wp_1_comments select * from DB_OLD.wp_comments;
insert into wp_1_links select * from DB_OLD.wp_links;
insert into wp_1_postmeta select * from DB_OLD.wp_postmeta;
insert into wp_1_posts select * from DB_OLD.wp_posts;
insert into wp_1_terms select * from DB_OLD.wp_terms;
insert into wp_1_term_relationship select * from DB_OLD.wp_term_relationships;
insert into wp_1_term_taxonomy select * from DB_OLD.wp_term_taxonomy;
UPDATE wp_1_posts SET post_author = 1;
Nastavenie notifikácie na komentáre:
update wp_1_options set option_value=“ where option_name=’moderation_notify‘; //zrušenie notifikácie na komentáre ktoré potrebujú moderáciu
update wp_1_options set option_value=“ where option_name=’comments_notify‘; //zrušenie notifikácie na nový komentár
Nastavenie popisu blogu:
select @descdata:=option_value from DB_OLD.wp_options where option_name=’blogdescription‘;
update wp_1_options set option_value=@descdata where option_name=’blogdescription‘;
Nastavenie All In One SEO:
select @descdata:=option_value from DB_OLD.wp_options where option_name=’aioseop_options‘;
update wp_1_options set option_value=@descdata where option_name=’aioseop_options‘;
Nastavenie Askimet-u:
insert into wp_1_options select * from DB_OLD.wp_options where option_name=’wordpress_api_key‘;
insert into wp_1_options select * from DB_OLD.wp_options where option_name=’akismet_discard_month‘;
Nastavenie Google Analytics:
insert into wp_q_options select * from DB_OLD.wp_options where option_name=’web_property_id‘;
Nastavenie Autoblogged:
CREATE TABLE `wp_1_autoblogged` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`title` varchar(75) NOT NULL,
`type` tinyint(4) NOT NULL,
`url` text NOT NULL,
`category` text,
`enabled` tinyint(1) DEFAULT NULL,
`addothercats` tinyint(1) NOT NULL,
`addcatsastags` tinyint(1) NOT NULL,
`tags` varchar(255) NOT NULL,
`includeallwords` varchar(255) NOT NULL,
`includeanywords` varchar(255) NOT NULL,
`includephrase` varchar(255) NOT NULL,
`includenowords` varchar(255) NOT NULL,
`searchfor` text,
`replacewith` text,
`templates` text NOT NULL,
`poststatus` varchar(10) NOT NULL,
`customfield` longtext NOT NULL,
`customfieldvalue` longtext NOT NULL,
`saveimages` tinyint(1) NOT NULL,
`createthumbs` tinyint(1) NOT NULL,
`playerwidth` smallint(6) NOT NULL,
`playerheight` smallint(6) NOT NULL,
`uselinkinfo` tinyint(1) NOT NULL,
`useauthorinfo` tinyint(1) NOT NULL,
`customplayer` varchar(255) NOT NULL,
`taggingengine` tinyint(1) NOT NULL,
`randomcats` tinyint(1) NOT NULL,
`usepostcats` tinyint(1) NOT NULL,
`addpostcats` tinyint(1) NOT NULL,
`author` text NOT NULL,
`alt_author` text NOT NULL,
`schedule` tinyint(1) NOT NULL,
`updatefrequency` tinyint(4) NOT NULL,
`post_processing` tinyint(1) NOT NULL,
`max_posts` tinyint(4) NOT NULL,
`posts_ratio` tinyint(4) NOT NULL,
`last_updated` date NOT NULL,
`update_countdown` tinyint(4) NOT NULL,
`last_ping` date NOT NULL,
`stats` text,
`usefeeddate` tinyint(1) NOT NULL,
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
insert into wp_1_autoblogged select * from DB_OLD.wp_autoblogged;