Switching Databases in LocalHost

just to understand you… You have a livesite on some host which uses cpanel and you want to revert it back to your local Installation? (e.g. xamp) I think the easiest way is to use a Backup/Restore plugin. For example Akeeba Backup (free and easy to use). It also helps you to replace permalinks that … Read more

How do I transfer user passwords from one WordPress site to another?

Yes and no wp_salt is the function you’re thinking of: https://core.trac.wordpress.org/browser/tags/4.8/src/wp-includes/pluggable.php#L1988 Your theory should be correct, copying the passwords over via SQL, and making sure all the salts are the same, then clearing cookies and trying to login, should do the trick. However, if we look at the code in the function, there are filters … Read more

How are multiple WordPress WPDB queries handled?

Method 1 – Check for the last row id. SELECT * FROM $incentives_table WHERE user_id = %s AND credited = FALSE You can get the last row in the array and get the column row_id. And then you can update with the where WHERE user_id = %s AND credited = FALSE AND row_id <= {last … Read more

A MySQL DB within a MySQL DB

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 … Read more