A MySQL DB within a MySQL DB

I have a client who does not want to switch hosting providers. This provider only allows one database per client. I am setting up a sandbox for the client and do not wish to share the database across the sandbox and the production website. Can I place a database within a database for the sandbox website? If so, I would like some recommendations on how to do this and how I would have WordPress access the nested database.


When you run the wordpress installation script, on step 5 of the famous 5 minute install https://codex.wordpress.org/Installing_WordPress#Step_5:_Run_the_Install_Script ... use the same Database Credentials as the existing site, but use a different prefix for the tables.

The default prefix is "wp_" make it something like "my_" and that's it.

(You'll see it says, "If you want to run multiple WordPress installations in a single database, change this.)

enter image description here

Tags: Database / Mysql

Similar questions

How to echo shortcodes within shortcodes within shortcodes
I'm all tied up in knots trying to echo shortcodes within shortcodes and I really need your help please! Here's the code: The function adds a button to my site which opens a modal popup when clicked. I'm tying to display content within that popup that is restricted based on membership. That part uses the groups_member shortcode. Then, I'm trying to...
accessing an element within a php object within an array of objects
I am hooking into a wordpress plugin and it is returning an object - $data. I think the structure of it is below. I did a error_log( print_r( $data, true ) ); to get that structure because I can only access the server logs because it's wordpress This is the important part. How can I access the user_email variable inside the class. tried searching t...
Nesting a Wordpress function within a shortcode within a function
I need to use a plugin shortcode within a template file, but have one of the variables be set by the value of a custom field in the post. Here's what I have so far. This just breaks the entire page. My effort (not working): The shortcode: The custom field function: Thanks.
PHP within a variable that contains HTML within another variable
I'd like to add a variable that holds a function ( be it WordPress or a custom function ) within HTML that's within another variable. The problem is that when I concatenate it pops outside of the div container in the front end, where I need it to be inside the container. For example shown here, I'd like "$stay_put" or PHP in general to be generated...
Advanced Custom Fields within WordPress - Unable to use a repeater within a group
I have done this 20+ times previously but I cannot figure out why my call to the repeater field is breaking my site. The page is unable to load due to a php error, it works if I remove the while loop that is calling the repeater field. I would like to know what I am doing wrong in this snippet: ~ The repeater field is called application_sectors, mi...
MySQL Select within WP Page template
I have one WP page which contains a form that posts data to a table in the Wordpress database called "members", data such as first name, surname, email, role and bio. Table posts fine and data is stored fine. I then have a second page where I want to list the data from the table, I have got as far as the following: The above code is displaying an a...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.