wordpress
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wordpress [2009/08/05 02:41] – suapapa | wordpress [2013/08/03 05:04] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 8: | Line 8: | ||
DELETE FROM wp_posts WHERE post_type = " | DELETE FROM wp_posts WHERE post_type = " | ||
</ | </ | ||
+ | *[[http:// | ||
<code python> | <code python> | ||
- | db = MySQLdb.connect(db=' | + | mport MySQLdb |
+ | |||
+ | db = MySQLdb.connect(db=' | ||
c = db.cursor() | c = db.cursor() | ||
c.execute(' | c.execute(' | ||
- | c.execute(' | + | c.execute(' |
l = c.fetchall() | l = c.fetchall() | ||
postIDs = map(lambda x: x[0], l) | postIDs = map(lambda x: x[0], l) | ||
Line 23: | Line 26: | ||
delete_candidates.append(mid) | delete_candidates.append(mid) | ||
- | print len(delete_candidates), | + | print len(delete_candidates), '/', |
+ | |||
+ | for mid in delete_candidates: | ||
+ | c.execute(' | ||
+ | print ' | ||
+ | |||
+ | db.commit() | ||
</ | </ | ||
+ | ====== 다국어 지원 ====== | ||
+ | *[[http:// | ||
+ | ===== wp_multilingual ===== | ||
+ | 저장된 번역은 다음과 같이 쌍으로 존재함. | ||
<code mysql> | <code mysql> | ||
- | mysql> desc wp_postmeta; | + | select meta_id, |
- | +------------+--------------+------+-----+---------+----------------+ | + | | |
- | | Field | + | | |
- | +------------+--------------+------+-----+---------+----------------+ | + | </ |
- | | meta_id | + | / |
- | | post_id | + | <code php> |
- | | meta_key | + | $str = serialize(array(base64_encode(serialize(unserialize(serialize($translation)))))); |
- | | meta_value | longtext | + | ... |
- | +------------+--------------+------+-----+---------+----------------+ | + | $GLOBALS[' |
- | 4 rows in set (0.00 sec) | + | " |
+ | " | ||
+ | $GLOBALS[' | ||
+ | " | ||
+ | " | ||
+ | '" | ||
+ | |||
+ | </ | ||
+ | translation 데이타는 아래와 같이 찾아서 복원함. | ||
+ | <code php> | ||
+ | $translations = unserialize($item[' | ||
+ | $translations = unserialize(base64_decode($translations[0])); | ||
</ | </ | ||
+ | ====== themes ====== | ||
+ | *[[http:// | ||
+ | ====== references ====== | ||
+ | *[[http:// |
wordpress.1249440109.txt.gz · Last modified: 2013/08/03 05:04 (external edit)