The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WHM change the Default prefix for wp- wordpress site creation

Discussion in 'General Discussion' started by AthensMatt, Mar 24, 2015.

  1. AthensMatt

    AthensMatt Member

    Joined:
    Mar 24, 2015
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Athens
    cPanel Access Level:
    Root Administrator
    Sorry if I'm posting this in the wrong place, I'm happy to post it somewhere else just let me know where.

    I'm new to WHM but am moving all our sites to WHM and hopefully our people will like it. We host many sites that use Wordpress. My question is this, When my customers create a Wordpress site on my server, I want it to change the prefix from wp- to something like wp-123456-. I don't want to do this manually since we will allow them to create more sites if they choose. So I want this automated by the server.
    Is there a config file on the WHM server that I could edit to make any new Wordpress site change the prefix to wp-123456-(whatever)?

    Thanks in advance for the help!!

    Matt
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,746
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    It's not supported, but you can adjust the prefix value configured in:

    Code:
    /usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress.pm
    EX:

    Code:
    table_prefix            => 'wp234',
    Note that you will need to develop a script that automatically updates the value in this file anytime the cPAddon is refreshed or updated through the upcp process. Also, ensure you enable "Allow cPAddons Site Software installations from modified sources" under the "cPAddons Site Software" tab in "WHM >> Tweak Settings".

    Thank you.
     
    AthensMatt likes this.
  3. AthensMatt

    AthensMatt Member

    Joined:
    Mar 24, 2015
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Athens
    cPanel Access Level:
    Root Administrator
    Thank you!
     
  4. AthensMatt

    AthensMatt Member

    Joined:
    Mar 24, 2015
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Athens
    cPanel Access Level:
    Root Administrator
    Michael, I don't seem to be getting the desired result. All files are still wp-"whatever" instead of wp234-"whatever".

    I've made the change to the WordPress.pm, and the tweak setting change. But each new test site I create has the conventional default naming. I'm assuming I'm making a small mistake somewhere.
    I've attached a pic for reference. Any assistance would be greatly appreciated! FilesPic.jpg WordPress_pm_PIC.jpg
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,746
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    I was under the impression you wanted to change the database prefix. You should consult with WordPress to see if changing the file names is supported:

    https://wordpress.org/support/

    It's not likely this is changeable through the cPAddon configuration.

    Thank you.
     
Loading...

Share This Page