tbbt
Forum Replies Created
-
Forum: Installing WordPress
In reply to: How to fill in values for WP install pageWell – I’m back, apparently things are not as rosy as I thought (surprise!) ??
When I try to login to WP – I am getting a download request for wp-login.php – instead of logging me into the admin panel. If I fill in the install page manually – then putting in the username and passwd does log me into the admin panel properly.
Can anyone advise why this is happening and a possible solution ?
More details below
Once I use the code above (in the last reply) – navigating to the URL (like 127.0.0.1) gives the following page content:
WordPress
Already InstalledYou appear to have already installed WordPress. To reinstall please clear your old database tables first.
Log In
at https://localhost/wp-admin/install.php
However, if I manually fill in the values on the actual install page I get the following:
Success!
WordPress has been installed. Were you expecting more steps? Sorry to disappoint.
Username wpuser
PasswordYour chosen password.
at https://localhost/wp-admin/install.php?step=2
then I can successfully visit – https://localhost/wp-login.php and log in as usual.
Forum: Installing WordPress
In reply to: How to fill in values for WP install pageHere’s what I did – quite simple actually – and I apologize in advance for the hackish looking code:
import argparse
import mechanizedef wpFillInstallPage(sname):
br=mechanize.Browser()
br.open(‘https://127.0.0.1/wp-admin/install.php’)
br.select_form(nr=0)
br[‘weblog_title’]=’Welcome to ‘ + sname
br[‘user_name’]=’wpuser’
br[‘admin_password’]=’password’
br[‘admin_password2′]=’password’
br[‘admin_email’]=’[email protected]’
br.submit()if __name__ == “__main__”:
parser = argparse.ArgumentParser(description=’Fill out the wp install page’)
parser.add_argument(‘siteName’, type=str, help=’the name of the site’)args = parser.parse_args()
wpFillInstallPage(args.siteName)
Now I can use python to set up posts etc..
Forum: Installing WordPress
In reply to: How to fill in values for WP install pageFound this interesting topic on Stackoverflow – but no easy solution proposed: https://stackoverflow.com/questions/5732384/automate-wordpress-install-from-python