• Resolved cltechsol

    (@cltechsol)


    I need to build a website which can authenticate users, present user specific information drawn from my own MySQL database. And I am trying to decide the best approach.
    My understanding is, with wordpress I must have my database tables embedded in the wordpress database. Is that true?
    The reason I want separate database is because I don’t want wordpress have write privilege to that database, which is updated by separate program. If that is possible, is there sample project of this kind I can use as template/starting point? Or tutorial specific to this kind of website?
    I am a newbie to wordpress and any advice is greatly appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • My understanding is, with wordpress I must have my database tables embedded in the wordpress database.

    The WordPress database contains many tables, you are quite free to add your own custom named and custom structured tables. You can be sure that WordPress core will never touch or even know about your tables since you alone know the table’s name. Similarly putting your update code into either a plugin or custom page template will give you total control over updating your tables.
    Using the secrecy of your table names (a form of security by obscurity) is admittedly weak security, but as a practical matter is sufficient.
    I started my developments along your lines by using a plugin which did
    csv import, details here:
    wp-csv-to-db plugin by Ruhul Amin
    https://wordpress.org/plugins/wp-csv-to-database/

    Thread Starter cltechsol

    (@cltechsol)

    Thank you very much for the information.

    Thread Starter cltechsol

    (@cltechsol)

    I will answer my own question for future reference or anyone else having the same question.
    As I tested, with wordpress, one can embed php code (using plugin) which can arbitrarily access any mysql database and perform any operation as long as privilege is given.
    One can also access the wordpress authenticated user id with php code (get_current_user_id()).
    So wordpress meets my requirements.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘(my own) Database driven website. Possible?’ is closed to new replies.