• I searched hundreds posts, but I can’t find how to gather a data form WP sql DB from local PC.
    For example, I need (periodically) copy the list of my WP users to my DB on my local PC. I can’t connect directly to sql DB as the WP is on webhosting and I can’t allow remote connection to sql DB.
    It is possible to write a php script, which arrange the data, but it is rather complicated. Is any easier way?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Why not use phpMyAdmin and export the wp-users table data?

    Thread Starter bobo8

    (@bobo8)

    I have written – I need it periodically (a few times a day) and not for me but for people not knowing WP (and not having an access to WP). It should work automatically.

    Ahh, I read ‘periodically’ as once in a while, not several times a day.
    Why not code a page template to grab the informaton? I just coded up one in about 15 minutes which will only display the information if ou are logged in. I would suggest limiting access to users with a specific role – like ‘editor’.

    If you code a page template you have to put it in your theme folder and you will have to call it ‘page-nnnn.php’ where nnnn=the page ID you are using.

    Thread Starter bobo8

    (@bobo8)

    Yes, that is what I mentioned in my first post (last sentence), but I thought, that for such rather common requirement there is an universal solution (a plugin or so).
    This gathering is needed frequently – for e-shops for orders… downloading to local account SW and so on.

    did you try a google search for a plugin? I found several my first try….

    Thread Starter bobo8

    (@bobo8)

    Of course, I didn’t find any. But it depends on which question you had. I looked for “remote connection sql database” and similar. What did you looked for?
    I found the plugin ABASE, but it helps only partially.

    try ‘wordpress plugin user list’

    Thread Starter bobo8

    (@bobo8)

    User list was only an example, I need data form different tables.

    So you are looking for something that will access one or more of the WordPress tables and produce a customized report for you…

    Good luck in your searching.

    I’d suggest you start writing a script. If you can’t then I’d hire someone to do it for you.
    check out https://jobs.wordpress.net

    Thread Starter bobo8

    (@bobo8)

    My idea is to have some php script, to which I can submit a sql query and it executes this and can return required data.
    I steadily think, that such common function is already programmed somewhere.

    Yes there is something like that phpMyAdmin.

    Thik of the security hole you would open to your site if you had a script that anyone could submit an sql query to? What if I submitted ‘delete from wp_posts;’ BOOM your database is empty, or how about ‘update wp_user set user_pass = ‘a hash I know’ where id = ‘1’;
    Boom I now have admin access to your site.

    I doubt that you are going to find anything like you want and I hope you don’t.

    Figure out what reports you need and code a page template to give you that information.

    Thread Starter bobo8

    (@bobo8)

    I have phpMyAdmin, but it is not usable, as I need it to work automatically.
    There is very easy protection – to enable the access only from my IP address.

    I steadily think, that such common function is already programmed somewhere.

    Well if you find it, be sure to post what it is so others can try it, but my guess is that it would take less time to code your own script as a page template than continue looking for something that may not exist or may exist but you might never come up with the search terms to find it.

    Any way, good luck, I can’t do anything else for you.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘How to gather data from WP sql DB to local PC’ is closed to new replies.