Revision: 9227
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at October 26, 2008 18:53 by matthewnovak
Initial Code
import MySQLdb tblPrefix = 'TABLE_PREFIX' conn = MySQLdb.connect (host='localhost', user='USERNAME', passwd='PASSWORD', db='DATABASE') cursor = conn.cursor() # delete hello world post cursor.execute('delete * from %sposts' % (tblPrefix)) # create a password, wp makes a random default one cursor.execute("""update %susers set user_pass = md5('PASSWORD') where user_login='admin'""" % (tblPrefix)) # title the blog cursor.execute('''update %soptions set option_value='TITLE_OF_BLOG' where option_id=3''' % (tblPrefix)) # make the blog public cursor.execute('''update %soptions set option_value = '1' where option_name = 'blog_public' ''' % (tblPrefix)) # allow pingback cursor.execute("""update %soptions set option_value = '1' where option_name = 'default_pingback_flag'""" % (tblPrefix)) # open for pings cursor.execute("""update %soptions set option_value = 'open' where option_name = 'default_ping_status'""" % (tblPrefix)) # open for comments cursor.execute("""update %soptions set option_value = 'open' where option_name = 'default_comment_status'""" % (tblPrefix)) # disallow comment registration cursor.execute("""update %soptions set option_value = '0' where option_name = 'comment_registration'""" % (tblPrefix)) # non-static page cursor.execute("""update %soptions set option_value = '0' where option_name = 'page_on_front'""" % (tblPrefix)) cursor.close() conn.close()
Initial URL
http://blackcodeseo.com/automatically-installing-wordpress/
Initial Description
Initial Title
Automatically Installing Wordpress Part 2
Initial Tags
wordpress
Initial Language
Python