How can I make my WordPress database accessible publicly without restrictions?

Tuhin Bhuiyan August 20, 2012
Pinterest Stumbleupon Whatsapp
Ads by Google

I have a question about a MakeUseOf article on Working With Custom Database Tables In WordPress.

At end of this tutorial, the author has given the permission to view the database detail for only registered user. My question is, how can I make it publicly viewable without any restrictions? Please help me. Thanks.

  1. muotechguy
    August 21, 2012 at 7:44 am

    Hi Tuhin; I wrote that so I guess I'll handle this one. The link in your question has a typo, btw, should be: http://www.makeuseof.com/tag/working-custom-database-tables-wordpress/

    To remove the logged in user restriction, just delete this line:

    ***
    if (is_user_logged_in()):
    ***

    and the final:

    ***
    endif;
    ***

    This is just a simple condition check that wordpress can do. is_admin() is another example. I would suggest getting a hang of these WordPress functions before opening up your database to the public though, but the method above will work.