Installation & Server Deployment Configuration
All WordPress sites (including About Lovia) and WooCommerce sites must have the following plugins:
- nginx helper. For purging nginx page cache (backed by Redis).
- Redis Object Cache. Support for object cache, backed by Redis.
- UpdraftPlus. For doing daily (database) and weekly (files) backups to our AWS S3 backup bucket.
- Yoast SEO. SEO helpers including Facebook OpenGraph support.
TODO: Due to privacy reasons, default username should not be from email. It’s much better to use several starting characters then append n-digit random number. May allow user to change the username to something else.
|User Role Editor||Assign permissions to roles. For example, Lovia allows Contributors the “upload_files” permission.|
|Redirection||Manage URL/page redirects.|
|WPForms||Form builder for contact, payment, survey, newsletter subscription, registration, etc.|
|Astra Pro (Premium)||Premium theme/addons for the base free Astra theme.|
|Advanced Gutenberg||Needed to have image lightbox for Gallery/Carousel.|
|Ultimate Addons for Gutenberg||Additional Gutenberg widgets.|
|Ultimate Addons for Elementor (Premium)||Additional Elementor widgets, including for WooCommerce.|
|Premium Starter Templates||Starter templates for Astra.|
|Convert Pro (Premium)||Conversion optimization tools.|
|Post Type Switcher||Change Post to Page and vice versa, or other Post Types.|
|Premium Addons Pro|
|Crocoblock (18 Jet plugins)|
|Rank Math (free)||Supports WooCommerce. Replaces: Yoast (Pro), Schema Pro (Premium), SEO Press Pro|
|MultilingualPress (Premium) (vs WPML vs Polylang)||Alternative: Bilingual Linker, Multisite Language Switcher|
|Pods Framework||Replaces: Meta Box / ACF|
|Easy Table of Contents||Include Table of Contents automatically in a post or page. Used by About Lovia for non-knowledge base pages.|
|Simple Image Sizes||Adds custom image sizes for use in Gutenberg post editor or Elementor image widgets.|
|Temporary Login without Password||To give admin access (temporary) to third-party vendor.|
|Kadence WooCommerce Email Designer||Easily customize the default transactional WooCommerce email templates|
|Dokan Multi-Vendor||For marketplace / multiple vendors in one WooCommerce site. Facebook Group: https://www.facebook.com/groups/dokanMultivendor|
FusionAuth SSO with Open ID Connect
In FusionAuth’s application configuration, configure authorized redirect URIs as follows:
Change vendor welcome setup wizard: https://nayemdevs.com/how-to-change-vendor-setup-wizard-text-in-dokan-multivendor/
Knowledge Base Plugins
Needed for About Lovia site. Is also a good use case to integrate with FAQ/knowledge base chatbot.
- BWL Knowledge Base. $29 – $145 extended.
- Knowledge Base. $39 – $195 extended.
- Heroic Knowledge Base. $129 for single site – $399 for 10 websites.
- Knowledge Center. Freemium, $99 single – $799 for 10 sites.
- MinervaKB. $35 – $92.
- Echo Knowledge Base [popular]. $23-30/site.
- WP Knowledgebase [free].
- Helpie WP. $49.
- BetterDocs (from the developer of Essential Addons for Elementor). Pro includes chatbot. $39-49/year.
- weDocs (currently free including the ratings feature, from the developer of Dokan). Used by weDevs themselves.
AWS CloudFront (CDN) + AWS WAF (Web Application Firewall)
Security: Wordfence Plugin, Disable File & Plugin Editing
- Install & activate Wordfence plugin
(pushd lovia.life/htdocs && sudo -H -u www-data wp plugin install wordfence && sudo -H -u www-data wp plugin activate wordfence)
2. Go to settings to set the alert email (
email@example.com which is forwarded to Hendy Irawan)
3. Enable auto-update.
4. Enable optimize NGINX.
5. Disallow file edit and file/plugin modifications:
define( 'DISALLOW_FILE_EDIT', true ); /* disable adding plugins */ define( 'DISALLOW_FILE_MODS', true );
Updating Plugins, Theme, and WordPress Core
Read timeouts will break WordPress update using web UI. Especially if you use CloudFront, which limits origin read timeout to 30 seconds, although it can be extended to 60 seconds (which is still not enough). The best way to update WordPress is by using WP CLI:
echo Updating: example.com cd /var/www/example.com/htdocs sudo -H -u www-data wp theme update --all sudo -H -u www-data wp plugin update --all # Below needed if you use WooCommerce: # sudo -H -u www-data wp wc update sudo -H -u www-data wp core update sudo -H -u www-data wp core update-db sudo -H -u www-data wp language core update sudo -H -u www-data wp cache flush
For updating multiple sites, create
~/update-plugins-themes.php with contents similar to above for each site.
If you get: “Warning: Failed to create directory ‘/var/www/.wp-cli/cache/’: mkdir(): Permission denied.” Solution is:
sudo mkdir /var/www/.wp-cli sudo chown -R www-data:ubuntu /var/www/.wp-cli sudo chmod -R g+w /var/www/.wp-cli
Remote Development with Visual Studio Code
To edit plugins and themes on-site, you can use Remote-SSH extension.
Preparation: You will need:
- chgrp the folder to
www-data, and set
chmod -R g+w.
- Install Remote-SSH extension.
- Edit your
- In VS Code, Ctrl+Shift+P > Remote-SSH: Connect to remote host…
- Choose your host (detects your
~/.ssh/configfile). Wait until it connected successfully.
- Click Open Folder. Choose/type your folder, e.g.
- Now you can work on the folder.
The diagram below is a standard diagram that is already installed on wordpress.
|wp_commentmeta||Each comment features information called the meta data and it is stored in the wp_commentmeta|
|wp_comments||The comments within WordPress are stored in the wp_comments table.|
|wp_links||Holds information related to the links entered into the Links feature of WordPress.|
The Options set under the Administration > Settings panel are stored in the wp_options table. See Option Reference for
|wp_postmeta||Each post features information called the meta data and it is stored in the wp_postmeta. Some plugins may add their own information to this table.|
|wp_posts||The core of the WordPress data is the posts. It is stored in the wp_posts table. Also Pages and navigation menu items are stored in this table.|
|wp_terms||The categories for both posts and links and the tags for posts are found within the wp_terms table.|
|wp_termmeta||Each term features information called the meta data and it is stored in wp_termmeta.|
|wp_term_relationships||Posts are associated with categories and tags from the wp_terms table and this association is maintained in the wp_term_relationships table. The association of links to their respective categories are also kept in this table.|
|wp_term_taxonomy||This table describes the taxonomy (category, link, or tag) for the entries in the wp_terms table.|
|wp_usermeta||Each user features information called the meta data and it is stored in wp_usermeta.|
|wp_users||The list of users is maintained in table wp_users.|