ERROR: “Table Prefix” must not be empty

You need to have the table prefix set in the wp-config.php file. It must be matching the same value in tables of your database, the default value is “wp_” but if you used a customized value for your tables to enhance security which is a good practice, you need to update your $table_prefix = ‘wp_’; … Read more

WordPress still requires FTP information

Guess it needs to be said first – it is a bad idea in general to just let anyone that succeeded to trick you into uploading his PHP onto your server to actually be able to write to your code directories. It is double problematic if you let him access to your root credentials and … Read more

Using wp config to connect to a DB from a plugin

I’m guessing this is a custom “plugin” where you are wanting to run a file externally that connects to the WordPress database, not really as a standard plugin which loads within WordPress environment, as in that case as @belinus says you can just use $wpdb class. Anyway, since ABSPATH is defined IN wp-config.php, you can’t … Read more

Multiple Address In WP-Option Value

After testing for hours, finally get it done. Here the solution: In database wp_options change the value for siteurl and home from your wordpress url to /path/to/wordpress WordPress URL Path To WordPress Then add these code in the bottom of wp-config.php define(‘WP_HOME’, ‘http://’ .$_SERVER[‘HTTP_HOST’].”https://wordpress.stackexchange.com/”); define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . “https://wordpress.stackexchange.com/” ); Now you can use … Read more

Best function/method to access wp-config?

I am not aware of a WordPress function to do this. But have a look at this search and replace tool: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ This achieves what you want by reading in the wp-config file and scanning through it. Have a look at the function “icit_srdb_define_find” on line 374.

DB access blocked when initializing WP externally

I accidentally stumbled into the answer today when I forgot to turn on my MAMP managed mysql server. At this juncture it pointed me to the critical difference. This answer is phrased for anyone running MAMP but potentially has broader applicability (certainly LAMP, WAMP, etc.); if you’re experiencing the same problem in an non-MAMP environment … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)