WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. besingamk
    Member
    Posted 10 months 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']..

    thanks

  2. JarretC
    Member
    Posted 10 months 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
    Member
    Posted 10 months ago #

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

  4. besingamk
    Member
    Posted 10 months 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.

Reply

You must log in to post.

About this Topic