I have a godaddy starter hosing plan which offers only one mysql database. I already have a wordpress website installed on it. I want to install another non-wordpress php website on it which also requires a database. I want to know if it is possible for both to share one database. Both are different websites with different content and i want to use the same domain with a subdomain for the later one.
please help.
Leave a Reply
You must be logged in to post a comment.
Yes, two sites can share a database, each with it’s own tables. Definitely use a namespace on your tables to easily identify which tables belong to which app.
You can use the same database with both websites by adding a prefix to all the tables of one of the sites. By default, WordPress prefixes all of its tables with
wp_
so as long as none of your tables for the other website start withwp_
you shouldn’t need to prefix any of the new websites tables.