[resolved] Using wordpress database info. instead of wpdb (4 posts)

  1. besingamk
    Posted 2 years ago #

    hello. just trying my luck if it is allowed to use database info such as database name, user, and pass.. i know it is not recommended. but i want to know if it is, for me to develop my wordpress custom plugin easily using my way on connecting database.

    can i use the db info just like this. $config['dbname'], $config['dbuser'], $config['dbpass']..


  2. JarretC
    Posted 2 years ago #

    You can do whatever you want really, even if it isn't recommended :)

    But if you plan to release it to the public you may want to consider following the WordPress coding standards.

  3. besingamk
    Posted 2 years ago #

    did you know how to get wordpress database info from wp-config.php?

  4. besingamk
    Posted 2 years ago #

    nevermind. i already solve the problem trying to echo those define variable on wp-config.php thanks anyways.

    $dbname = DB_NAME;
    $dbuser = DB_USER;
    $dbpass = DB_PASS;

    no need to make a class to extends wpdb.

Topic Closed

This topic has been closed to new replies.

About this Topic