-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added some wordpress and Wocommerce docs #259
Open
hpowernl
wants to merge
3
commits into
master
Choose a base branch
from
woocommerce_update
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
98 changes: 98 additions & 0 deletions
98
...mmerce/how-to-configure-converter-for-media-plugin-for-wordpress-woocommerce.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
myst: | ||
html_meta: | ||
description: Learn how to configure the "Converter for Media – Optimize images | ||
| Convert WebP & AVIF" plugin on your Hypernode server. Follow step-by-step | ||
instructions to verify your VHOST type, update NGINX configuration, and test | ||
the plugin for optimal performance and compatibility with WordPress/WooCommerce. | ||
title: How to Configure "Converter for Media – Optimize images | Convert WebP | ||
& AVIF" Plugin on Hypernode | ||
redirect_from: | ||
- /en/ecommerce/woocommerce/how-to-configure-converter-for-media-plugin-for-wordpress-woocommerce/ | ||
--- | ||
|
||
<!-- source: https://support.hypernode.com/en/ecommerce/woocommerce/how-to-configure-converter-for-media-plugin-for-wordpress-woocommerce/ --> | ||
|
||
# How to Configure Converter for Media – Optimize images Convert WebP & AVIF Plugin on Hypernode | ||
|
||
For the WordPress/WooCommerce plugin [Converter for Media – Optimize images | Convert WebP & AVIF](https://nl.wordpress.org/plugins/webp-converter-for-media/), an adjustment is required in your Hypernode NGINX configuration. To make it easier for you, follow the instructions below to get the plugin working correctly on Hypernode. | ||
|
||
## Verify your VHOST type | ||
|
||
First, check if your VHOSTS has the correct type by running the following command: | ||
|
||
```bash | ||
hmv --list | ||
|
||
``` | ||
|
||
Running this command will give you an output like this: | ||
|
||
```console | ||
+-------------------+----------+----------------+-------+-------------+---------+--------------+ | ||
| servername | type | default_server | https | force_https | varnish | ssl_config | | ||
+-------------------+----------+----------------+-------+-------------+---------+--------------+ | ||
| test.hypernode.io | magento2 | True | True | True | False | intermediate | | ||
+-------------------+----------+----------------+-------+-------------+---------+--------------+ | ||
``` | ||
|
||
As you can see, the type is incorrect because it needs to be set to WordPress. To change this, use the following command: | ||
|
||
```bash | ||
hmv --type wordpress --https test.hypernode.io | ||
``` | ||
|
||
After running this command, your VHOSTS will be set to WordPress. Make sure to replace `test.hypernode.io` with your actual domain name. | ||
|
||
## Update NGINX configuration for the plugin | ||
|
||
To ensure that "Converter for Media – Optimize images | Convert WebP & AVIF" works correctly, apply the following configuration: | ||
|
||
```nginx | ||
# BEGIN Converter for Media | ||
set $ext_avif ".avif"; | ||
if ($http_accept !~* "image/avif") { | ||
set $ext_avif ""; | ||
} | ||
|
||
set $ext_webp ".webp"; | ||
if ($http_accept !~* "image/webp") { | ||
set $ext_webp ""; | ||
} | ||
|
||
location ~ /wp-content/(?<path>.+)\.(?<ext>jpe?g|png|gif|webp)$ { | ||
add_header Vary Accept; | ||
add_header Cache-Control "private"; | ||
expires 365d; | ||
try_files | ||
/wp-content/uploads-webpc/$path.$ext$ext_avif | ||
/wp-content/uploads-webpc/$path.$ext$ext_webp | ||
$uri =404; | ||
} | ||
# END Converter for Media | ||
``` | ||
|
||
Place the above configuration in `/data/web/server.media.conf.` Once you save the file, NGINX will automatically reload, and if something goes wrong, you will be notified. | ||
|
||
## Test the Configuration | ||
|
||
To test the configuration, you can use the following command: | ||
|
||
```bash | ||
➜ ~ curl -IL -H "Accept: image/webp" https://test.hypernode.io/wp-content/upload/test.jpg | ||
|
||
HTTP/2 200 | ||
server: nginx | ||
date: Mon, 13 May 2024 08:49:44 GMT | ||
content-type: image/webp | ||
content-length: 53624 | ||
last-modified: Wed, 08 May 2024 13:34:25 GMT | ||
etag: "663b7f61-d178" | ||
expires: Tue, 13 May 2025 08:49:44 GMT | ||
cache-control: max-age=31536000 | ||
vary: Accept | ||
cache-control: private | ||
accept-ranges: bytes | ||
``` | ||
|
||
By following these instructions, you should be able to configure and test the "Converter for Media – Optimize images | Convert WebP & AVIF" plugin to work correctly on your Hypernode server. |
52 changes: 52 additions & 0 deletions
52
.../woocommerce/how-to-set-up-a-cron-job-for-wordpress-woocommerce-on-hypernode.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
myst: | ||
html_meta: | ||
description: Learn how to replace the default WordPress cron with a cron job on | ||
Hypernode to improve performance, schedule tasks precisely, and mitigate DDoS | ||
attacks. | ||
title: How to Set Up a Real Cron Job for WordPress/WooCommerce on Hypernode | ||
redirect_from: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this |
||
- /en/ecommerce/woocommerce/how-to-set-up-a-cron-job-for-wordpress-woocommerce-on-hypernode/ | ||
--- | ||
|
||
<!-- source: https://support.hypernode.com/en/ecommerce/woocommerce/how-to-set-up-a-cron-job-for-wordpress-woocommerce-on-hypernode/ --> | ||
|
||
# How to set up a cron job for WordPress/WooCommerce on Hypernode | ||
|
||
In this guide, we'll explain how to replace the default WordPress cron job with a cron job on your Hypernode server. This can be useful for low traffic sites, important tasks that need to be run at specific times, mitigating excessive DDoS attacks, or improving high page load times. | ||
|
||
## Disable WordPress cron | ||
|
||
To begin, disable the default WordPress cron by editing the wp-config.php file. | ||
|
||
Connect to your server using an FTP client like FileZilla or an SSH client such as PuTTY. Navigate to the root directory of your WordPress installation and locate the `wp-config.php` file. Open the file for editing and add the following line of code before `/* That’s all. Stop editing! Happy blogging. */`: | ||
|
||
```php | ||
define('DISABLE_WP_CRON', true); | ||
``` | ||
|
||
This code disables the default WordPress cron functionality, allowing you to set up a cron job. | ||
|
||
## Adding a new cron job to your server | ||
|
||
Next, set up a cron job on your Hypernode server. Log in to your server via SSH and open your crontab file with the following command: | ||
|
||
```bash | ||
crontab -e | ||
``` | ||
|
||
Add the following line to your crontab file to set up a cron job that runs every minute: | ||
|
||
```console | ||
* * * * * wget -q -O - 'https://yourdomain.hypernode.io/wp-cron.php?doing_wp_cron' >/dev/null 2>&1 | ||
``` | ||
|
||
Replace `https://yourdomain.hypernode.io` with the actual URL of your WordPress site. | ||
|
||
Explanation of the Cron Job Command | ||
|
||
- `* * * * *`: Specifies the interval for the cron job. In this case, it is set to run every minute. You can adjust this based on your needs. | ||
- `wget -q -O - 'https://yourdomain.hypernode.io/wp-cron.php?doing_wp_cron'`: Uses wget to make a web request to the WordPress cron URL, triggering any scheduled tasks. | ||
- `>/dev/null 2>&1`: Discards any output from the command, preventing it from filling up your server logs. | ||
|
||
After setting up your cron job, monitor your WordPress site to ensure that scheduled tasks are being executed as expected. This setup ensures that your WordPress or WooCommerce site on Hypernode handles scheduled tasks more reliably, especially under conditions where the default cron system may not suffice. |
32 changes: 32 additions & 0 deletions
32
...ons/woocommerce/how-to-use-redis-with-woocommerce-and-wordpress-on-hypernode.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
myst: | ||
html_meta: | ||
description: How to enhance your WordPress/WooCommerce site's performance using | ||
Redis. Discover the benefits of Redis, recommended plugins, and step-by-step | ||
installation instructions. | ||
title: How to Use Redis with WooCommerce and WordPress on Hypernode | ||
redirect_from: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this |
||
- /en/ecommerce/woocommerce/how-to-use-redis-with-woocommerce-and-wordpress-on-hypernode/ | ||
--- | ||
|
||
<!-- source: https://support.hypernode.com/en/ecommerce/woocommerce/how-to-use-redis-with-woocommerce-and-wordpress-on-hypernode/ --> | ||
|
||
# How to Use Redis with WooCommerce and WordPress on Hypernode | ||
|
||
Remote Dictionary Server (Redis) is an in-memory, persistent, key-value database known as a data structure server. Unlike similar servers, Redis can store and manipulate high-level data types such as lists, maps, sets, and sorted sets. | ||
|
||
By storing important data in its memory, Redis ensures fast data retrieval, significantly boosting performance and reducing response times. | ||
|
||
## Which Plugins Can We Use for Redis in WordPress/WooCommerce? | ||
|
||
There are several plugins available for Redis. The two most commonly used are [Redis Object Cache](https://wordpress.org/plugins/redis-cache/) and [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/). | ||
|
||
Due to the complexity of the cache module in "W3 Total Cache" and the possibility that you may already be using other cache plugins, we recommend the "Redis Object Cache" plugin. | ||
|
||
## How to Install Redis Object Cache | ||
|
||
Redis is already active on the server on port 6379. | ||
|
||
Next, install the Redis Object Cache plugin via the WordPress Dashboard or using Composer. For detailed installation instructions, please refer to the standard installation procedure for WordPress plugins. | ||
|
||
After installing and activating the plugin, navigate to `WordPress` -> `Settings` -> `Redis` or `Network Admin` -> `Settings` -> `Redis on Multisite networks`. Enable the cache and check if the plugin can connect automatically. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this
redirect_from
necessary? We're not redirecting from anywhere right?