Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    May 2003
    Posts
    71

    Lightbulb How to create a new account with wordpress on it ?

    Hello,

    A reseller customer wants to install for students an account with a default installation of Wordpress ?

    Any idea on how to do that ?

    Thanks a lot,
    Francois

  2. #2
    Member
    Join Date
    May 2003
    Posts
    71

    Default

    Anyone ?

    Thanks,
    Francois

  3. #3
    Member
    Join Date
    Feb 2007
    Posts
    79

    Default

    Get your reseller to put the contents of the wordpress install in the "cpanel3-skel" folder, you will find it in his accuonts root

  4. #4
    Member
    Join Date
    May 2003
    Posts
    71

    Default

    Hello,

    Thanks for your answer,

    But this won't install the database of wordpress. I would like a site ready to be used with something like admin, admin the default pass.

    Thanks,
    Francois

  5. #5
    Member
    Join Date
    May 2003
    Posts
    71

    Default

    Any 3rd party script on the market could do that ?

  6. #6
    Member
    Join Date
    Feb 2005
    Posts
    312

    Default

    you should put the wordpress files in the cpanel3-skel as was suggested below, then you can make a script called "/scripts/postwwwacctuser" which cpanel executes after creating a new user account... in there you can run whatever you want.. the configuration below is simple and just runs an external "addwordpress" script.

    in the addwordpress script, create a database user and database for this account:
    I have NOT tested the below, but I grabbed some code from the cpanel scripts and I reasonably believe this should do what you want.. if you find you need to tweak it... post your modifications back here for people
    --also, you may want to add some checks in postwwwacctuser to make sure this account SHOULD have the wordpress db created, otherwise, you'll be creating this for every new account. (if you use /scripts/postwwacct instead of postwwwacctuser, you get more information including, I believe, the reseller, so you can put in a check for that and just add the wordpress for particular reseller accounts)


    /scripts/postwwwacctuser:
    #!/bin/sh
    /scripts/postwwwacctuser $1

    /scripts/addwordpress:
    #!/bin/sh
    #
    # this will create a DB user similar to: username_wordpress with the
    # admin user: username_wpadmin with password: admin
    # this naming convention is required in order for the user to properly use
    # phpmyadmin and for cpanel to manage the proper databases when backing
    # up and deleting users
    #
    user=$1;
    hostname=`hostname`;
    if [ -e "/usr/bin/mysql" ]; then
    mysql='/usr/bin/mysql'
    mysqladmin='/usr/bin/mysqladmin'
    else
    mysql='/usr/local/bin/mysql'
    mysqladmin='/usr/local/bin/mysqladmin'
    fi

    /scripts/mysqladduserdb $user_wpadmin 'admin'
    $mysqladmin-u root <<END_OF_DATA
    create database $user_wordpress
    GRANT ALL ON $user_wordpress.* TO $user_wpadmin@localhost
    GRANT ALL ON $user_wordpress.* TO $user_wpadmin@$hostname
    END_OF_DATA
    $mysqladmin -u root reload <<EOM
    EOM

Similar Threads & Tags
Similar threads

  1. Replies: 8
    Last Post: 06-21-2011, 10:54 AM
  2. reseller account dont have create account function
    By seachen in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-13-2010, 09:05 AM
  3. Can not create Account Functions for Reseller Account
    By nitram in forum New User Questions
    Replies: 2
    Last Post: 09-25-2007, 02:24 PM
  4. Reseller Account - Remaining Resources on Create Account Page?
    By Funkworkz in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 07-14-2004, 07:50 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube