My apologies for not attending to this sooner, but I think you'll get more attention to this thread in the Discussions forum -- I'm moving it there now.
There are a few ways to do this and some of it depends on your preference.
First option, ODBC connection directly to the MySQL database.
- Very fast changes or new table entries made to the MySQL database.
- Easy to script the sync/push of data.
- Works directly from FMGo
- You may want to add a UUID column to the wp_posts table. Some people just use the postID, but some do not.
- You need an ODBC driver that costs money. Mac ODBC: MySQL Driver.
- Some security risk because the database needs to be open to remote connections. This is not a big deal usually as you can limit the IP addresses that are allowed to access the database and there is still security, but it is technically less secure.
- You can only make direct changes to the tables. No hooks or other PHP will run as a result of your changes. For example if in stock control you reduce _stock from 3 to 0 via ODBC your _stock_status meta will still be "instock". They both need to be changed as the PHP that wold normally run this process through WP or plugins is not firing. Can be problematic in some situations. Like not generating thumbnails when an image attached to a post.
The second option, use Wordpress API WordPress APIs « WordPress Codex
- There are a few APIs to choose from and they each have benefits.
- More control over security of the data.
- Easily deal with hooks and other PHP that you expect to run when certain things are done.
- Already built into Wordpress.
- There is next to no support from Wordpress/Automattic for the APIs they provide.
- They are generic APIs and sometimes will not be specific enough for you.
- Need to be familiar with PHP and JSON
- You may need a plugin for FileMaker if you want to execute PHP directly from FM. An example is SmartPill PHP Edition™
Third option, third party WP API plugin or specific API with a plugin you use already (not many out there but some exist). WP REST API v2 Documentation
Ups and downs are about the same as the core API but there is slightly better support and documentation.
Myself and others have had bad experiences. Lauren has very poor support. She disappears for months at a time. I paid and still never got my registration credentials for nearly a year. Finally I got them and they did not work. Got errors for bad /unknown credentials. About 6 months later I get an email inviting me to purchase a new version available (Not sure what is new as the XMLRPC API it uses has not changed much at all). I sent an email to Lauren about the new version and got a response, surprising. When I replied requesting that I get proper credentials for the previous version before I purchased the new one I heard nothing back. So I think it is about two years now and she has my money and I have nothing. Sad that there are some FM developers like this.
I hope this helps.
Good up and down lists, BT! I tend to also warn that the MySQL may NOT even allow external access. As an ISP this was NOT allowed for our sites. I suppose that is partially what you meant by:
needs to be open to remote connections
If OP controls the db servers & web servers, perhaps, but be careful!
beverly I did forget to make a specific point of having an open database that allows external connections.
My experience with this is that most hosting companies have an option to allow remote access when the database is created. If you did not select that option when you created it you need to create a new one. There is no way to add it later. This is usually not an option with the automated Wordpress install wizards and only available via manual creation.
Most all servers running CPanel seem to create open databases by default and this allows you to turn access on or off as you wish, but that may be an option only for the host depending on the company you use. You usually need to just call and ask them to allow it if you do not have access.
For the APIs you might also go the path of using one of the many plugins for FM that support cURL: I believe MonkeyBread, Base Elements and some others off support. You can send cURL commands via AppleScript and Terminal, but this will not work server side and I have found it is a little picky about authentication sometimes and has issues that may be hard to troubleshoot.
Thank you. ~C
Hi xanderms, 360Works MirrorSync could be a great option for you. Check out this video: Sync Wordpress and FileMaker Server using MirrorSync - YouTube
If you decide to go this route, but would like an experienced FileMaker developer to walk you through the set up or even implement it for you – we can take care of this at our hourly consulting rate. Just thought I would mention this option as I see you are trying to get this done ASAP
Feel free to reach out to us any time at firstname.lastname@example.org if you have any questions. Happy to help!
great post bigtom - and I can second that recommendation of what not to buy - I had a client pay Lauren. Huge delays in getting the login, huge issues syncing and no response from her at all. No refund.
I see she has a new website and new higher prices...
In 25 years of filemaker dev work this is the first bad experience I've had - other developers have all been amazing.
mirror sync is great - it's pricey but there's a lot of work gone into it. It's been working perfectly for a client for about 2 years now - fmp > mysql syncing 10,000's records. I doubt you'd get that stability using the WP api's!