Which MySQL database is my WordPress installation using?

I am working on a website for a client who has several websites on her hosting account. I would like to move one of the sites that runs on WordPress to my localhost. But I have problems with MySQL db and cannot figure out which database the site is using.

wp-config.php points to one database, but when I look at the same database in phpMyAdmin, it doesn't have any of the public WordPress tables. Instead of the wp_ prefix wp_ there are a bunch of tables with the cp_ prefix. I do not know what it means. There are other databases on the client hosting account that have WordPress tables, but the wp_options tables for them point to other site URLs, not the one I'm trying to work for.

How to find out which database is used?

+4
source share
1 answer

Perhaps the table prefix was changed to cp_ instead of the standard wp_ . Some installations do this to mitigate certain types of SQL injection attacks. wp-config.php should always point to a real database, which in your case should have table names such as cp_posts , cp_postmeta , cp_options , etc.

Check the $table_prefix variable in the configuration file, or it can be buried in any cPanel option.

+5
source

Source: https://habr.com/ru/post/1438261/


All Articles