Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Boris Kamp
Boris Kamp
16,660 Points

publishing Filemaker (database software) data on Wordpress website

Hi guys!

We would like to be able to publish Filemaker data on our Wordpress website. The website is up and running and the filemaker database is set up. We do not need a live connection between both systems so we chose to export the FM data to .csv so we can import it to the mysql database on the server and from there we would like to display in on the website.

Now are my questions, since this kind of development is new to us:

  1. can I setup an automated import to the mysql database from a source like dropbox or something? For example can we make the mysql database import and overwrite the existing database each 24 hours from a .csv file located somewhere? We need this automated overwrite option because the FM data changes often and we need up to date info on the website)

  2. How can we display the data from the mysql database on the WP frontend?

I've been looking into this myself and couldn't find any clear answers or guides. Can you guys point me in the right direction?

(btw, I know there are table plugins I can use for WP but they do not fulfill our needs, and I think it's exciting to do it all by ourself with help from this great community)

2 Answers

I can't offer much, but first, if you can get a live connection between the two, that would be a great start, as FileMaker appears to support SQL commands that don't alter its schema or change data. If not, no worries.

In that case, you'll want to do the Dropbox thing, as you said above. I know Dropbox has an SDK for stuff like this; you'll want the PHP one. Dropbox's SDK and API will allow your app to subscribe to events, including when a user's files change. Then, you can fetch the CSV from Dropbox and store it locally.

If the data isn't sensitive, you probably don't need to transcribe the CSV into MySQL, although you could if you wanted to.

PHP has a set of functions that allow you to manipulate CSV. You can use those in a WordPress template to read off the CSV file and print it to the page. In fact, you could even hook this up to a WordPress shortcode to make it work from the WP admin area.

All in all, the process is a little complex, so I'll try to sum it up with this: when you edit your FM database and export it to a CSV file, Dropbox will upload that CSV file and notify your web server, which will download and store that CSV and optionally transcribe it to MySQL. On page request, your script (through either a shortcode or a page template) will display the information in the CSV in a table.

There. I hope that wasn't too complicated. Does that help?

Boris Kamp
Boris Kamp
16,660 Points

Thanks for your reply! Sounds pretty good, but I missed the part where the .csv file gets imported in the MySQL Database, how do I do that? where do I start? Thanks for you opinion!

Zac Gordon
Zac Gordon
Treehouse Guest Teacher

Short andwer, this would not be a simple or easy process and I would recommend looking into hiring a developer to make you a custom plugin rather than try to tackle yourself. This is just my 2cents having worked with FileMaker integrations a bit.

Boris Kamp
Boris Kamp
16,660 Points

Thanks for your view on this Zac. I found this guide on the internet, doesn't look that difficult and complex to me? http://www.milanm.com/?p=491 Once the MySQL database is up and running Im sure I'll be able to pull the data to the front end of my website