WordPress
Pass Ubuntu 18.04, 20.04
Firewall
Maybe not need behind private network
sudo vi /etc/default/ufw
sudo ufw allow ssh
sudo ufw allow 'Nginx HTTP'
sudo ufw allow 80
sudo ufw allow 443
sudo ufw allow 8050
sudo ufw status
# Check IPV6=yes
sudo ufw enable
Database
sudo apt install mariadb-server
systemctl status mariadb
# Set user for database
sudo mysql_secure_installation
sudo mysql
CREATE DATABASE wp_blog_xxx;
GRANT ALL ON wp_blog_xxx.* TO 'USER'@'localhost' IDENTIFIED BY 'passw0rd' WITH GRANT OPTION;
-- without password
GRANT ALL ON wp_blog_xxx.* TO 'USER'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit
Test login mariadb
mariadb -u develop -p
input password 'passw0rd'
exit
Web
Apache2
sudo apt install apache2
#Change port to 8050
sudo vi /etc/apache2/ports.conf
sudo systemctl restart apache2
sudo systemctl status apache2
apache2ctl -t
sudo a2ensite blogwp.conf
sudo a2dissite 000-default.conf
#Apache
sudo apt-get install php libapache2-mod-php php-mysql
sudo vi /etc/apache2/sites-available/blogwp.conf
<VirtualHost *:8050>
ServerName anextsoft.com
ServerAdmin [email protected]
DocumentRoot /var/www/blogwp
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/blogwp>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Nginx
#Nginx
sudo apt install nginx
sudo apt install php-fpm php-mysql
sudo apt install curl php-curl php-gd php-intl php-mbstring php-soap php-xml php-xmlrpc php-zip
sudo vi /etc/nginx/sites-available/wp_blog_xxx
change port before install, maybe use 80 is less issue, other port can work with reverse proxy.
server {
listen 8050;
listen [::]:8050;
root /var/www/wp_blog_xxx;
index index.php index.html index.htm;
server_name www.xxx.com; # or _ for any income.
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
location ~\.(ini|log|conf)$ {
deny all;
}
location ~ /\.ht {
deny all;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
}
If need static file:
location =/ads.txt {
try_files /ads.txt =404;
}
SSL:
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name XXX.com;
ssl_certificate /etc/letsencrypt/live/XXX.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/XXX.com/privkey.pem;
access_log /home/USER/XXX.com/logs/access.log;
error_log /home/USER/XXX.com/logs/error.log;
root /home/USER/XXX.com/public/;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name www.XXX.com;
ssl_certificate /etc/letsencrypt/live/XXX.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/XXX.com/privkey.pem;
return 301 https://XXX.com$request_uri;
}
server {
listen 80;
listen [::]:80;
server_name XXX.com www.XXX.com;
return 301 https://XXX.com$request_uri;
}
sudo ln -s /etc/nginx/sites-available/wp_blog_xxx /etc/nginx/sites-enabled/
sudo nginx -t
sudo rm /etc/nginx/sites-enabled/default
sudo systemctl reload nginx
sudo vi /etc/nginx/nginx.conf
http {
client_max_body_size 128m;
}
sudo mkdir /var/www/wp_blog_xxx
sudo chown -R $USER:$USER /var/www/wp_blog_xxx
PHP Test page
cat > /var/www/wp_blog_xxx/info.php << EOL
cat > /var/www/wp_store_edt/info.php << EOL
<?php
phpinfo();
EOL
Check php server is working http://{ip}:8050/info.php
Check Loaded Configuration File show in info.php.
sudo vi /etc/php/8.1/fpm/php.ini
sudo vi /etc/php/8.1/apache2/php.ini
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 120
sudo systemctl restart php8.1-fpm.service
cat /var/log/nginx/error.log
Install WP
cd /tmp
curl -LO https://wordpress.org/latest.tar.gz
tar xzvf latest.tar.gz
cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php
sudo cp -a /tmp/wordpress/. /var/www/wp_blog_xxx
sudo chown -R www-data:www-data /var/www/wp_blog_xxx
curl -s https://api.wordpress.org/secret-key/1.1/salt/
define('AUTH_KEY', 'B)*T>RM7!q6,R9yV?ND?Qaz.;$CYWW{IpwrC-?hJ=D/Z17Wv1v/?q(m) f9ksK9i');
...
define('NONCE_SALT', 'H_<X/U9vy<e!I*J:5l>3A+KJRU;==;ZDo*+:k:#_wbi-P)$!SNC4eE?rcxVp}Tj]');
sudo vi /var/www/wp_blog_xxx/wp-config.php
Past salt and mod database connection.
Begin install: http://{ip}:8050
Disable Chrome
chrome://net-internals/#hsts
Input 'localhost' to 'Delete domain security policies'.
Or use Firefox for http.
Config WP
Config New York UTC-5
WordPress Address (URL) http://192.168.50.85:8010 Site Address (URL) http://192.168.50.85:8010
Install theme Divi.zip
Install plugin bloom.zip monarch.zip
Add child theme
cd /var/www/wp_blog_xxx
cd wp-content/themes
mkdir Divi-Child-Theme
sudo chown -R www-data:www-data Divi-Child-Theme
sudo vi Divi-Child-Theme/style.css
/*
Theme Name: Divi Child /*Theme Name+Child*/
Description: Child theme for Divi theme
Author: Rojar Smith
Author URI: <a href="https://www.brontometa.com">https://www.brontometa.com</a>
Template: Divi
Version: 1.0.0 /<em>Child theme version</em>/
*/
sudo vi Divi-Child-Theme/function.php
<?php
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
function my_theme_enqueue_styles() {
$parent_style = 'parent-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
}
?>
sudo cp Divi/screenshot.jpg Divi-Child-Theme
Apply child theme
Config AP port through 8050 to 8050.
curl http://public_ip:8050//
SSL
Dont' use the same domain of SSL in different site.
sudo certbot --nginx -d elecdove.com -d www.elecdove.com -d
# crontab -e
0 0 1 */2 * /usr/bin/certbot renew --quiet --no-self-upgrade
SSL with Reverse Proxy
sudo certbot --nginx --expand -d xxx.com -d www.xxx.com -d blog.xxx.com -d mail.xxx.com -d api.xxx.com -d static.xxx.com
Your key file has been saved at:
/etc/letsencrypt/live/xxx.com/fullchain.pem
/etc/letsencrypt/live/xxx.com/privkey.pem
ls /etc/nginx/sites-available/
ls /etc/nginx/sites-enabled/
vi /etc/nginx/sites-available/default
sudo nginx -t
sudo systemctl restart nginx
Install plugin Really Simple SSL
Without Really Simple SSL to modify wp-config.php:
define('WP_HOME','http://xxx.com'); define('WP_SITEURL','http://xxx.com');
If you want change sql,
use wp_blog_xxx;
update wp_options SET option_value='http://xxx.com' WHERE option_name='home';
update wp_options SET option_value='http://xxx.com' WHERE option_name='siteurl';
Behind reverse proxy
sudo vi /var/www/wp_blog_brontometa/wp-config.php
<?php
define('FORCE_SSL_ADMIN', true);
$_SERVER['REQUEST_URI'] = str_replace("/wp-admin/", "/wp-admin/", $_SERVER['REQUEST_URI']);
if($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'){
$_SERVER['HTTPS'] = 'on';
$_SERVER['SERVER_PORT'] = 443;
}
define('WP_HOME','https://brontometa.com');
define('WP_SITEURL','https://brontometa.com');
Move Site
Build the clean new site.
Login old site admin page.
http://{ip}:{port}/wp-login.php
WPVivid > Export > Download
Open new site
WPVivid > Upload > Restore
If site not work, update WordPress Url and Port in MySQL.
select * from wp_options where option_name='siteurl';
select * from wp_options where option_name='home';
Memeory
wp-config.php
define('WP_MEMORY_LIMIT', '128M');
To Static
To offline static.
Install Simply Static plugin.
Simply Static › Diagnostics to check status
Make the chmod -R 777 path.
Destination URLs > Save for offline use
Generate.
Multisite
wp-config.php
/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );
/* That's all, stop editing! Happy publishing. */
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'localhost');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
/* That's all, stop editing! Happy publishing. */
.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
Tools >> Network Setup
Really Simple SSL When the built in deactivation does not work, manual uninstalling
1) Deactivate the plugin
Deactivate the plugin by renaming the plugin folder. Open your FTP client, navigate to wp-content/plugins/ and rename the really-simple-ssl plugin to really-simple-ssl-off
2) If used, remove .htaccess redirect
Then, still in the FTP client, find your .htaccess file (make sure hidden files are shown), in the webroot, and remove all lines between these comments (and the comments themselves as well)
# BEGIN rlrssslReallySimpleSSL
and
# END rlrssslReallySimpleSSL
3) Remove changes in the wp-config.php
Now, still in your webroot, find your wp-config.php, open it and check if any lines were added by Really Simple SSL. If so, remove those lines.
4 a) Change site URL and home URL back to http://
Now, add
update_option( 'siteurl', 'http://example.com' );
update_option( 'home', 'http://example.com' );
To your functions.php. You can find the functions.php in wp-content/themes/your-active-theme/functions.php.
Use a new browser (or clear your browser history completely), browse to your HTTP link, and check the result.
4b) Change site URL and home URL to http://, database method
If you can’t get it to work using method 4a, you can change the URL back to http directly in the database.
https://codex.wordpress.org/Changing_The_Site_URL. Scroll down to Changing the URL directly in the database and follow the instructions.
Woo
Settings -> Anyone can register (Enable)
New User Default Rule -> Customer
Account
Divi -> Text -> [woocommerce_my_account]
paypal Sandbox Merchant Id -> Account ID
paypal
I was having this issue last night and found that it didn’t work IF you created the sandbox account through the plugin or through sandbox.paypal.com.
https://developer.paypal.com/ and create a sandbox account there, then use those generated login credentials within the plugin.
Plug-in
Thank You Page for WooCommerce
To replace default received order.
Installed Plugins List
Shop filter Divi module must select.
Advanced AJAX Product Filters for WooCommerce
Unlimited AJAX products filters to make your shop perfect
Version 1.6.4.5 | By BeRocket
Advanced Google reCAPTCHA
Advanced Google reCAPTCHA will safeguard your WordPress site from spam comments and brute force attacks. With this plugin, you can easily add Google reCAPTCHA to WordPress comment form, login form and other forms.
Version 1.0.15 | By WebFactory Ltd
Advanced Shipment Tracking for WooCommerce Add shipment tracking information to your WooCommerce orders and provide customers with an easy way to track their orders. Shipment tracking Info will appear in customers accounts (in the order panel) and in WooCommerce order complete email.
Version 3.5.3 | By zorem
Bot Protection
WordPress Security, Bot Protection
Version 5.25 | By MalCare Security
Breeze
Breeze is a WordPress cache plugin with extensive options to speed up your website. All the options including Varnish Cache are compatible with Cloudways hosting.
Version 2.0.29 | By Cloudways
Email Verification for WooCommerce
Verify user emails in WooCommerce. Beautifully.
Version 2.5.9 | By WPFactory | View details
If Menu - Visibility control for menus
Display tailored menu items to each visitor with visibility rules
Version 0.17.0 | By Layered
Smart WooCommerce Search
Ajax Smart WooCommerce Search allows you to instantly search products.
Version 2.6.3 | By YummyWP
Toolset Types defines custom content in WordPress. Easily create custom post types, fields and taxonomy and connect everything together.
Version 3.4.20 | By OnTheGoSystems
WooCommerce
An eCommerce toolkit that helps you sell anything. Beautifully.
Version 8.1.0 | By Automattic
WooCommerce Multilingual & Multicurrency Multilingual Settings | Multicurrency Settings | Deactivate | Registered Make your store multilingual and enable multiple currencies | Documentation
Version 5.2.0 | By OnTheGoSystems
WooCommerce Payments
Accept payments via credit card. Manage transactions within WordPress.
Version 6.4.1 | By Automattic
WooCommerce PayPal Payments
PayPal's latest complete payments processing solution. Accept PayPal, Pay Later, credit/debit cards, alternative digital wallets local payment types and bank accounts. Turn on only PayPal options or process a full suite of payment methods. Enable global transaction with extensive currency and country coverage.
Version 2.2.2 | By WooCommerce
WP Mail SMTP Get WP Mail SMTP Pro | Settings | Docs | Deactivate Reconfigures the wp_mail() function to use Gmail/Mailgun/SendGrid/SMTP instead of the default mail() and creates an options page to manage the settings.
Version 3.9.0 | By WP Mail SMTP
WPML Multilingual CMS
WPML Multilingual CMS | Documentation | WPML 4.6.6 release notes
Version 4.6.6 | By OnTheGoSystems
WPML String Translation
Adds theme and plugins localization capabilities to WPML | Documentation | WPML String Translation 3.2.8 release notes
Version 3.2.8 | By OnTheGoSystems
WPvivid Backup Plugin
Clone or copy WP sites then move or migrate them to new host (new domain), schedule backups, transfer backups to leading remote storage. All in one.
Version 0.9.91 | By WPvivid Team
From GoDaddy Woo
Abandoned checkout reminders Automatically track cart activity and send an email reminder to recover lost revenue.
Cost of goods Track profit and cost of goods for your store. Generate profit reports by date, product, category, and more. This feature replaces the Cost of Goods plugin.
Discount links Share discount links with your customers and add coupons from ads, email campaigns, or social links. Create or edit a coupon to get started. This feature replaces the URL Coupons plugin.
Ecommerce emails Customize your emails to reflect your brand and increase customer loyalty. This feature replaces the WooCommerce Email Customizer plugin.
Gift certificates Create custom gift certificates that your customers can purchase and send to their friends and family. This feature replaces the PDF Product Vouchers plugin.
Google analytics Track advanced eCommerce events and more with Google Analytics. This feature replaces the Google Analytics and Google Analytics Pro plugins.
Sequential order numbers Format order numbers, change your starting number, and differentiate free orders. This feature replaces the Sequential Order Numbers Pro plugin.
Shipment tracking Share shipment tracking information with your customers. Open one of your Processing orders to get started. This feature replaces the Shipment Tracking plugin.
Stripe Accept credit card payments using Stripe.
Woo - 360º Image By adding multiple images to the product gallery, you can easily add dynamic and controllable all-round flipping images to your WooCommerce website.
Woo - Accommodation Bookings Book accommodation with WooCommerce and the WooCommerce Booking extension.
Woo - Additional Variation Images Unlimited images for your product variations.
Address Validation Add address verification, autocomplete, and postcode lookup at checkout
Admin Custom Order Fields Store custom information for orders in your WooCommerce admin
Woo - Advanced Notifications Easily set up "new order" and inventory email notifications for multiple recipients.
View document Woo logo Amazon S3 Storage Serve digital products via Amazon S3
Woo - Australia Post Shipping Method Get shipping information through the Australia Post API for use in your WooCommerce store, for both domestic and international packages.
Authorize.Net Gateway Adds the Authorize.Net Payment Gateway to your WooCommerce site, allowing customers to securely save their credit card or bank account to their account for use with single purchases, pre-orders, subscriptions, and more!
Woo - AutomateWoo Powerful WooCommerce automated marketing capabilities. AutomateWoo gives you the tools you need to grow your store and increase your profits.
Bambora Gateway Accept credit card payments using Bambora
Woo - Bookings Allow customers to book, reserve a seat or rent equipment without leaving the website.
Woo - Bookings Availability Sell more bookings by presenting a calendar or schedule of available slots in a page or post.
Woo - Box Office Sell tickets for your next event, concert, function, fundraiser or conference directly on your own site
Woo - Brands Create, assign and list brands for products, and allow customers to view by brand.
Woo - Bulk Stock Management Edit product and variation stock levels in bulk via this handy interface
Woo - Canada Post Shipping Method Obtain freight information from Canada Post Fee API, applicable to domestic and international packages.
View document Woo logo Cart Add-ons A powerful tool for driving incremental and impulse purchases by customers once they are in the shopping cart
Cart Notices Display dynamic, actionable messages to customers at checkout
Chase Paymentech Gateway Accept credit card payments using Chase Paymentech
Checkout Add-Ons Offer free or paid add-ons to customers at checkout
Woo - Checkout Field Editor Optimize your checkout process by adding, removing, or editing fields as needed.
Customer/Order/Coupon CSV Import Suite Import customer, order, and coupon data via a CSV file
Customer/Order/Coupon Export Export customer, order, and coupon data in CSV and XML formats
CyberSource Gateway Accept credit card payments using CyberSource
Woo - Deposits Allow customers to purchase products using remittance or installment payments.
Elavon Converge Gateway Accept credential card and ACH payments using Elavon Converge
Enhanced Checkout A blazingly fast checkout experience for WooCommerce, with big improvements on both mobile and desktop.
Woo logo - FedEx Shipping Method Obtain freight information from FedEx API, applicable to domestic and international packages.
Woo - Follow-Ups Automatically contact customers after purchase - be it everyone, your most loyal or your biggest spenders - and keep your store top-of-mind.
Woo - Force Sells Force products to be added to the cart
View document Global Payments HPP Accept credit card payments using Global Payments HPP
View document Intuit Payments Gateway Accept credit card payments using Intuit
Local Pickup Plus Allow customers to schedule pickup at multiple locations
MailChimp for WooCommerce Memberships Sync membership data with Mailchimp
Measurement Price Calculator Add a calculator to your product pages to calculate product quantity required or overall price by square footage and more.
Memberships Give members access to restricted content or products, for a fee or for free
Woo - Min/Max Quantities Minimum and maximum quantity rules for products, orders and categories.
Moneris Gateway Accept online payments using Moneris
Nested Category Layout Show products grouped by category and sub-category
Woo - Order Barcodes Generates a unique barcode for each order on your site — perfect for e-tickets, packing slips, reservations and a variety of other uses.
Order Status Control Decide which types or paid order are automatically completed
Order Status Manager Customize your fulfillment workflow with custom order statuses
Woo - Photography Sell photos in the blink of an eye using this simple as dragging & dropping interface.
Woo - Points and Rewards Provide points that can be redeemed for discounts to reward customers for purchases and other actions.
View document Woo logo Pre-Orders Open to customers to place orders for products before delivery.
Print Invoices/Packing Lists Print invoices, packing lists, and pick lists from your Orders page
Woo - Product Add-Ons Offer add-ons like gift wrapping, special messages or other special options for your products.
Woo - Product CSV Import Suite Import, merge, and export WooCommerce product and category information as CSV files.
Product Documents Attach manuals and other important documents to your products
Woo - Product Inquiry Form Allow visitors to contact you directly and inquire about product information through the product information page. The contact process is protected by reCAPTCHA.
Product Reviews Pro Add Amazon-style reviews to your product pages
Woo - Product Vendors Turn your store into a multi-vendor marketplace
Woo - ProductsCompare WooCommerce Product Comparison allows potential customers to easily compare products within your store.
Woo - Purchase Order Gateway Seamlessly accept purchase orders as a payment method on your WooCommerce store.
Woo - Quick View Show a quick-view button to view product details and add to cart via lightbox popup
Woo - Returns and Warranty Requests Manage the RMA process, add warranties to products, and let customers request and manage returns/exchanges from their account.
Woo - Royal Mail Provide customers with Royal Mail shipping information.
Woo - Shipping Multiple Addresses Allows customers to ship a single item within a single order to multiple addresses.
Social Login Speed up checkout with social login from nine different platforms
Woo - Software Add-on Sell License Keys for Software
Woo - Store Catalog PDF Download Provide customers with a PDF download of the product catalog generated by WooCommerce.
Woo - Subscription Downloads Offer your subscribers more downloadable content by listing downloadable products in your store.
Woo - Subscriptions Let customers subscribe to your products or services and pay on a weekly, monthly or annual basis.
View document Tab Manager Showcase product information by adding custom tabs
Woo - Table Rate Shipping Advanced and flexible shipping methods. Calculate multiple shipping rates based on location, price, weight, shipping class, or quantity of items.
Teams for WooCommerce Memberships Sell memberships to teams, companies, groups, or families
Twilio SMS Notifications Send SMS order updates to customers and admins
Woo - UPS Shipping Method Obtain freight information from UPS API, applicable to domestic and international packages.
Woo - USPS Shipping Method Get shipping rates from the USPS API which handles both domestic and international parcels.
Woo - Xero Save time with automatic syncing of WooCommerce and Xero accounts.
From GoDaddy Blog
-
HubSpot for WooCommerce
-
WooCommerce Customizer.
-
WooCommerce PDF Invoices & Packing Slips.
-
Custom Product Tabs for WooCommerce.
-
WooCommerce Multilingual.
-
YITH WooCommerce Wishlist.
-
WooCommerce Checkout Field Editor (Manager) Pro.
-
WooCommerce Currency Switcher.
-
Abandoned Cart Lite for WooCommerce.
-
Product Import Export for WooCommerce.
-
WooCommerce Menu Cart.
-
WooCommerce Stock Manager.
-
WooCommerce Product Slider.
-
WooCommerce Products Filter.
-
WooCommerce Simply Order Export.
-
Paid Memberships Pro.
Develop
Homestead: Windows/Linux
Valet: Only Mac