Wordpress

From SWKLS WIKI
Revision as of 21:13, 30 March 2020 by Unknown user (talk) (Created page with "==Server Side== ===Common Error Fixes=== Ensure that the folder owner & group for the website is correct <syntaxhighlight lang="Bash" line start="1"> ls -la /var/www/html/ </s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Server Side

Common Error Fixes

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

ls -la /var/www/html/

(should be ec2-user:apache)

If not, change it:

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

Edit wp-config file to include:

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:

mysql -u <user> -p
show databases;
use <database_name>;
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://kinsleylibrary.info', 'https://kinsleylibrary.info');
UPDATE wp_options SET option_value = REPLACE(option_value, 'http://', 'https://');


Other commands for reference:
show tables;
show columns from <table_name>;