1

I finally have been able to install Craft CMS. During installation I left the table prefix field empty. I assume that for each site separate tables are created. Therefore, it would be more user-friendly to use a different table prefix for each site. How can I add a table prefix after the installation?

Is it sufficient to rename each table manually and then add the prefix to the .env file?

1 Answer 1

1

You would only need to add a prefix if you were planning on multiple installs of Craft on the same DB, most likely you are not so you can just leave it blank.

You don't need seperate DBs for a multi-site install.

If you did install with different DB prefixes for each, each Craft install would need to be licensed seperately; again probably not what you want.

2
  • Thank you for the clarification.
    – flip
    Commented Mar 12 at 22:59
  • 100% agree with Seth. Worth mentioning if you're on a recent version of Craft, there is a php craft db/drop-table-prefix CLI command, which goes the other direction. i.e. remove table prefixes if you're using them.
    – Brad Bell
    Commented Mar 20 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.