Internal Server Error – Fusion Core

As i was searching for a nice wordpress theme, I came accross with some nice review on AVADA Theme from ThemeFusion. I got my AVADA theme and I installed it on my site through FTP. I was able to successfully transfer the theme to my themes folder in my site. But when I click the Activate Theme button … I got INTERNAL SERVER ERROR
Continue reading “Internal Server Error – Fusion Core”

How to send html email using wordpress wp_mail

I was trying to send fancy emails for clients who signed in my page. Unfortunately by default wordpress only allows email in only text form. Thus i made a few research and came up with this solution.

To change the content type to HTML paste the following code in your theme’s functions.php file.


add_filter( 'wp_mail_content_type', 'set_content_type' );
function set_content_type( $content_type ){
	return 'text/html';
}

$wpdb don’t use table prefixes

WordPress configuration file “wp-config.php”
$table_prefix = ‘xxx_’;
Upon checking phpmyadmin :
xxx_posts <- as you can see my table names are using a prefix of xxx_

but using $wpdb :

global $wpdb;
$result=$wpdb->get_results( “SELECT ID,post_title from $wpdb->posts where post_status=’draft'” );

notice that we use ( $wpdb->posts ) inside our query ignoring the prefix of xxx from our table names.
conclusion: wordpress $wpdb uses/understand the default table names without the prefix.

wp-config.php file location

wp-confi g.php File
The most important fi le in any WordPress installation is the wp-config.php fi le. This fi le contains
all database connection settings, including the database name, username, and password to
access your MySQL database. This fi le also stores additional database and other advanced settings.
The wp-config.php fi le was originally named wp-config-sample.php. Renaming the file
to wp-config.php is one of the fi rst steps to installing WordPress.
The wp-config fi le is typically stored in the root directory of WordPress. Alternatively, you can
move the wp-config fi le out of the WordPress root directory and into the parent directory. So if
your WordPress directory is located here,
/public_html/my_website/wp-config.php

you can safely move the fi le to here:

/public_html/wp-config.php

WordPress looks for the wp-config fi le in the root directory fi rst, and if it can’t fi nd that fi le it
looks in the parent directory. This happens automatically so no settings need to be changed for this
to work.

NOTE: Moving the wp-config.php out of the root WordPress directory is a good
security measure, making it nearly impossible to potentially access this fi le from
a web browser.

Up ↑

%d bloggers like this: