Wordpress

From SWKLS WIKI
Jump to navigation Jump to search

Server Side

Common Error Fixes

Ensure that the folder owner & group for the website is correct

1 ls -la /var/www/html/

(should be ec2-user:apache)

If not, change it:

1 chown -R /var/www/html/<site_name>

Edit wp-config file to include:

1 define('FS_METHOD', 'direct');

MySQL Replace HTTP with HTTPS

Reference: https://www.bram.us/2014/12/06/migrating-your-wordpress-website-from-http-to-https/

To modify all posts to reflect https for a given domain:

 1 mysql -u <user> -p
 2 show databases;
 3 use <database_name>;
 4 UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://kinsleylibrary.info', 'https://kinsleylibrary.info');
 5 UPDATE wp_options SET option_value = REPLACE(option_value, 'http://', 'https://');
 6 
 7 
 8 Other commands for reference:
 9 show tables;
10 show columns from <table_name>;