1

I am in a situation where I am being asked to make a single WAR file that runs Wordpress. Using Quercus, Tomcat and httpd+mod_rewrite I was able to make a WAR file containing everything except the database, which I ran externally. However, I'm not sure how I might go about removing the dependency upon an external database (and, frankly, this whole endeavor seems like a bad idea to me).

This article describes how Wordpress has been successfully deployed on the Google App Engine and hence without needing MySQL, but this was done using JPA.

Instead of embedding a MySQL instance, if I could use an external MSSQL database connection instead that would be fine too. (This is an old post, but it seems to suggest that real MySQL is the only supported database for Wordpress.) Is the most viable option to attempt to replace each MySQL call in the Wordpress source code to a MSSQL call? Is there some kind of compatibility/translation layer that I could use instead? (I saw this question, but the solution will not work in my case.)

UPDATE: I came across MySQL-JE, but it looks out of date and not quite complete enough (not sure how I would tell Quercus/PHP to communicate with it). Has anyone used it? If so, do you think it would help solve this problem?

3
  • 3
    Check out JDBC. You can put a MySQL installation in a WAR file but it'll do you no good. Commented Dec 16, 2013 at 21:31
  • @SotiriosDelimanolis I'm pretty sure Quercus is using JDBC to make the MySQL connection. Are you saying that I could redirect it to use a MSSQL server somehow? Commented Dec 16, 2013 at 21:32
  • I'm sorry, I don't know Quercus. You should be able to configure your DataSource to go to your remote database. Commented Dec 16, 2013 at 21:33

1 Answer 1

1

Embedded Database

According to this chart, MySQL is not built for embedded use.

I can point you to two pure Java database engines for embedding in a Java app. Both are open-source, free of cost, and under active development. Both have a good pedigree with a long line of database development history behind them.

WordPress Requires MySQL

According to this WordPress Requirements page, specifically MySQL is required. That's annoying. The main point of SQL is to avoid database-vendor lock-in.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the links; they may come in handy in the future though they don't help me much in this case. I think I will pursue the MySQL<-->MSSQL translation layer path instead of the embedded path.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.