We help IT Professionals succeed at work.

Trying to display data from MS SQL server to a WordPress site hosted on Godaddy's Business Hosting Plan (Linux Environment)

Hello and thanks in advance for any insight the community can provide. I'm working on a WordPress site hosted on GoDaddy's Business Launch Hosting Plan, so it's a Linux  environment.  The challenge I have is with trying to use a SQL query to display data from an external MS SQL server to the WordPress site.
When I started looking into this, I wanted to use a plugin (WPDataTable) to do this. I cleared one error when trying to connect to the server by enabling pdo_sqlsvr. Then I received the following error:

wpDataTables could not connect to mssql server. mssql said: There was a problem with your SQL connection - SQLSTATE[IMSSP]: This extension requires the Microsoft ODBC Driver 13 for SQL Server to communicate with SQL Server. Access the following URL to download the ODBC Driver 13 for SQL Server for x64: http://go.microsoft.com/fwlink/?LinkId=163712

I called GoDaddy to see how to resolve the error. They said our website would need to be hosted in their Windows environment (Plesk) in order to communicate with a MS SQL server, otherwise, I'd have to export data from MS SQL to i.e., CSV to then import to MySQL.

- Someone today (not godaddy) said there's potentially an option if I had root access to set up Microsoft’s freetds configuration, which I'm pretty sure I don't have through Godaddy (we're not on the VPS hosting plan) and this goes beyond my level of expertise.
- I'm assuming that whether attempting to do this with a plugin, or writing code, MS SQL server just doesn't communicate with websites hosted in a Linux environment.

The amount of data I need to query is relatively small, up to 100 records a month, updated a few times a month, with 5 or 6 columns of text related to short news articles and promotions along with links to PDF files associated with each record, the goal was to have the records update automatically on the website as data on the MS SQL server updated.

The version of PHP we're on with GoDaddy is PHP version:  7.2

(Lastly, I've been doing so much reading/googling and talking to GoDaddy, I chose high priority because the issue is driving me a little batty, yikes, and thanks again. :)
Watch Question

Fractional CTO
Distinguished Expert 2019
Tip: You'll likely never get this to work will with GoDaddy or most low-end hosting options.

What you're describing is very simple to setup... if... and this is a big if...

You have root on a machine + can install/update packages yourself.

This is likely impossible with GoDaddy, as you have to both install all required packages (like ODBC driver code) + then you must keep this code updated all the time.

Suggestion: Lease a dedicated server + hire someone to admin this server for you.

Also, use Ubuntu Bionic. If you attempt using RedHat/CentOS/Fedora, mucking about with the package manager + multi-year old Kernels installed on even the latest RedHat 7.x Distros, will eat up a massive amount of time.

Put another way, if you can ssh into a machine as root, you can resolve this type of problem in a few minutes.
Di GaffOwner/Consultant


Thank you David for the response and the detail. Now I wish I had someone I can tap to just do this. I enabled SSH access, will have to see if we have root access and if we do, a resource to handle the package installs. I'm curious if anyone happens to be out there with that was able to do this on GoDaddy (or not).
Éric MoreauSenior .Net Consultant
Top Expert 2016

How do you connect to your database? You know you are connecting to a MySQL database on WordPress? I have been successfully connected a .Net application to a WordPress database (MySQL) hosted on GoDaddy without issues.
David FavorFractional CTO
Distinguished Expert 2019

@Di, I'll PM you with my contact info, if you get completely stumped.

You're welcome!

Explore More ContentExplore courses, solutions, and other research materials related to this topic.