PDA

View Full Version : SQL Express & WP?



Garret Mott
29-Dec-2016, 04:47 PM
Hi All -

I realize WP is designed to work with MySQL. However, I am quoting on a site that will need to store a bunch of info & I'd like it all to be in one DB. Yes, I could use Mertech's driver for the DF side of things, but that starts adding cost. I could also use the embedded db - but would prefer something just a bit more modern - though the current site they have uses the embedded db for the (classic webapp) asp side of things.

I see various posts online (including one @ MSDN: https://blogs.msdn.microsoft.com/brian_swan/2010/05/12/running-wordpress-on-sql-server/ ) about using SQL Express with WP. Anyone here done that?

Thoughts, suggestions? TIA & Happy New Year!

wila
29-Dec-2016, 04:54 PM
Hey Garret,

I run quite a few wordpress sites for my customers.
As you might have guessed it is all on linux and yes all of these wordpress sites are using mySQL.

Personally I would be very hesitant to run wordpress on anything else. Not because I love mySQL that much, but because it is the main database for wordpress and everything around it expects mySQL.
Could it work with MSSQL? Probably, would I use it? Nope


I realize WP is designed to work with MySQL. However, I am quoting on a site that will need to store a bunch of info & I'd like it all to be in one DB.

Umm. I hope you meant that you like it all to be on the same server. I would not use the same database as wordpress is using as that will complicate things a bit too much. As in that you have to careful with running updates.. and for wordpress that is something you want to be doing quite often.

--
Wil

Garret Mott
29-Dec-2016, 05:03 PM
Hmmm... Thanks Wil!

I actually meant one DB - which it seems you don't much care for. Thing is, the WP side will be saving some info & so will the DF side - all of which will need to be downloaded via web services to the customer's main location. That's why I thought one db made sense.

It's never simple, is it?

Todd Forsberg
29-Dec-2016, 05:38 PM
There is a specialized version of WP to work with MSSQL. I don't recall the name, but I'll try to look it up tonight. I have used it with no problems, but not production, just for my testing and experimenting.

wila
29-Dec-2016, 06:14 PM
Hmmm... Thanks Wil!

I actually meant one DB - which it seems you don't much care for. Thing is, the WP side will be saving some info & so will the DF side - all of which will need to be downloaded via web services to the customer's main location. That's why I thought one db made sense.

It's never simple, is it?Not a fan of having WP and other things in the same database, but it can be done.
In that case I would recommend to use table prefixes with Wordpress (which is well supported by WP) so that you can prevent name clashes.
See also:
https://codex.wordpress.org/Installing_Multiple_Blogs#Single_Database


--
Wil

Garret Mott
29-Dec-2016, 06:28 PM
Thanks Wil

I guess another option would be automatic updates from MySQL to SQL Express. IOW - a scheduled task of some sort to copy data from MySQL to MS SQL Express. Just have to figure out the best way to do that.

Garret Mott
29-Dec-2016, 06:30 PM
Hi Todd -

On the WP site, all the warnings are "Don't do that!" Then we have Will saying that - which probably means even more to me.

I'd be interested to see what you've got though.

wila
29-Dec-2016, 07:32 PM
Garret,

Well the choices depend a bit on what you are trying to do.
If you want to access data directly from what is stored within WordPress then I would try to use as loose an API as is available, there's a few:
https://codex.wordpress.org/WordPress_APIs

I would go for that over trying to get data straight from the WordPress SQL tables.

But perhaps that's not what you want at all and WordPress is just part of a certain needed workflow and that's why you like the data to be close together. In the latter case I see less of a problem on using the same database, but personally I would still prefer separate databases.

--
Wil

Garret Mott
29-Dec-2016, 07:36 PM
Thx Wil -

The WP site will be accepting data from forms (name & address for a brochure, etc.). That will be stored in a table & I need to get it to download to their home system.