Effective and Efficient ways to Mass Install Wordpress
Link-Love, Programming, SEO, Theory, Tools & Applications | (6)
Blah...commencement of pleasantries.....blah blah....witty charming banter....blaah....introduction to mass install wordpress..blaaah......more witty commentary....blah blah.....install this...ftp that...blah...incredibly complicated....blah..self aggrandizement....blah......
Situation:
Shared Host
CPanel
No SSH Access
Solution 1: FTP Transfer FolderĀ to server, Mechanize/CURL Install
Process:
1) Collect variables: database, username, cpanel login, cpanel password, keywords
2) If necessary, create databases and users on CPanel host (using CURL, or Mechanize)
Here is a function I use to create CPanel DBs:
def self.create_db(base_url, cpanel_loc, cpanel_user, cpanel_pass, db, dbuser, dbpass)
agent = WWW::Mechanize.new
agent.user_agent_alias = $USER_AGENTS[rand($USER_AGENTS.length)]
agent.basic_auth(cpanel_user,cpanel_pass)
url = "http://#{base_url}#{cpanel_loc}/frontend/x/sql/"
agent.get(url)
agent.get("#{url}adddb.html?db=#{db}")
agent.get("#{url}adduser.html?user=#{dbuser}&pass=#{dbpass}")
agent.get("#{url}addusertodb.html?user=#{cpanel_user}_#{dbuser}&db=#{cpanel_user}_#{db}&ALL=ALL")
end
3) For each keyword in the keyword list, create a different blog
3a) Write local wordpress-config file with ...