We are interested in your security and performance! To improve performance and enhance security of the Joomla platform be sure to provide a new prefix for Joomla database tables. This can not only provide improvements as indicated about security and performance, but it can provide a unique instance of the tables so more tables and Joomla installations can be performed. This may not be the case in your situation, like for single company installation, however it can provide a self-documenting installation. That’s to say that when you see the tables for a company “Joe’s Hardware Shop” in your database you can easily recognize the owning tables by the prefix. It’s more recognizable as to which business the database belongs to.
Just in case you installed Joomla with the default “jos_” table prefix, here are the instructions to change the prefix to something else to improve security. Notice: follow the instructions as they’re listed and it will minimize downtime since youre website is running. Here at SnapJag Creative Designs we want our instructions are such that you can feel assured that you are able to perform the steps with accuracy, efficiency, and with as little impact as possible to your operations.
It is highly recommended that you perform these steps at a low-peak time. But make sure you are awake enough to follow the instructions if you’re doing it at night. =) Note: This method does not ask you to remove the tables first, so don’t delete the old “jos_” tables until the end. This is to help make sure you have a backup in place and that the old structure is still ready in case anything goes wrong.
- Kick people out: make sure no one is doing administration or management in the Joomla back-end.
- Login to phpMyAdmin.
- Click on the Export link, leaving all options as they are; specifically for:
- Export: SQL
- SQL options: SQL Export compatibility = None
- SQL options: Structure (Add AUTO_INCREMENT, Enclose table and field names with backquotes)
- SQL options: Data (Complete inserts, Extended inserts, Max Length: 50000, Use hexadecimal for binary fields, Export type: INSERT)
- Save to file: not on, you will use the query box to copy and paste the values to disk. If you have large content then use the method to capture to the server and retrieve the data.
- Click the Go link, this export may take a few minutes depending on the size of your content.
- Open your favorite editor (like UltraEdit), copy the content from the query box and paste it to a new text window in the text editor.
- Save the file as a new name to make a backup of the old data.
- Save the file again as a new name to make a copy of the new data.
- Do a search and replace for “jos_” and replace with the four character prefix of your choice. If you are using UltraEdit, choose to see a line listing of all results and scan them to make sure replacements didn’t happen with any other data than that of table name references.
- Comment out with dashes (‘–’) the statement ‘Create Database…’ if it exists in the script so that an attempt to create the database doesn’t occur. This will cause an error, no damage, just an error and you’ll have to do this step and run it again if you don’t.
- Click on the SQL Query Window link to bring up a new SQL query window. You can’t do this next step in the same window as the query box output.
- Copy the text from the text editor and paste them into the SQL Query Window where it says “Run SQL query/queries on server localhost:”
- Click the Go button to begin the script to create the new tables.
- Wait for the response from the server in the browser window behind the SQL Query Window. Address any issues if you need to.
- If the response is not an error. Close the SQL Query Window show the phpMyAdmin home window.
- It’s possible the left side of the browser will say “No Tables Found”. Don’t worry, press F5 to refresh the window, and you’ll see all the new tables.
- Open your Joomla! back-end, go to Site | Global Configuration | Server
- Change the Database Settings | Database Prefix to your new prefix and click Save
- You may now be required to sign-in again. You will now be connected to your new tables.
- One more step is to delete the old ‘jos_’ tables. Go back to the phpMyAdmin window
- Click the Databases link, then the database where the tables exist
- Select all the ‘jos_’ tables, be careful to not select any new tables.
- At the bottom of the list, click the combo box “With Selected” and click Drop. This will build a script to remove the selected tables, confirm they are only the ‘jos_’ tables, and click Go.
- Wait for a ‘Executed Successfully’ statement and then
- Close the myPHPAdmin window
- For one final test, back in Joomla! logout and log back in and create some articles or do normal things to test the functionality.
- Also, confirm in the Site | Global Configuration | Server screen that the Database Prefix is set accordingly.
Hope this has been thorough and helpful. If you see any problems, errors, or changes that need to be made, please let us know.