This tutorial shows how to change Joomla database prefix. By default Joomla creates a custom prefix. If you are willing to make the template appear as at the preview page your database prefix should match the one in the sample data dump.sql file. Let’s see how to resolve this issue.
Clear Joomla install
If you are installing Joomla from scratch you can type the correct database prefix on Database Configuration step of the installation procedure.
When you are done installing joomla using _jos database prefix you can proceed to the Joomla template аnd sample data installation.
Install over live website
If you are planning to install the template sample data importing the dump.sql file over existing website you need to make sure that the tables prefix in the SQL file is equal with the templates prefix in your database.
Please note: importing sample data dump.sql file into your database will replace all your existing content and site settings with the sample ones. Your website will look like template preview.
If you are still sure that you want to do this you need to locate the database prefix.
Open your Joomla installation directory and there open the configuration.php file. Search for the variable “$dbprefix” (usually line 16):
public $dbprefix = 'p3qyn_';
If the prefix is “jos_” you are free to proceed with the sample data installation. Otherwise you need to edit the dump.sql file.
Open the template package, go to the sources folder and open the dump.sql file with notepad or any other HTML/Text editor. Using the Find and Replace (CTRL+F) tool in your editor replace “jos_” prefix with the one from the configuration.php file (in our case: “p3qyn_”).
When the replacement is complete you are free to proceed with the Joomla template аnd sample data installation.Joomla. How to change database table prefix ,