wordpress lxc some touches #467

Closed
opened 2026-02-04 19:04:31 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @lavacano on GitHub (Feb 10, 2025).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

wordpress

📂 What was the exact command used to execute the script?

bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/wordpress.sh)"

📝 Provide a clear and concise description of the issue.

a few finishing things need to be done to have a /functioning/ wordpress site in the year of our lord 2025

I like to name my lxc's hostname their site fqdn these 2 are for https reverse proxy

  1. modify /etc/hosts
# --- BEGIN PVE ---
xxx.xxx.xxx.xxx hostname.domain hostname
# --- END PVE ---
change xxx.xxx.xxx.xxx to your reverse proxy ip, where hostname.domain is the website you are hosting.
  1. into wp-config.php:
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
   $_SERVER['HTTPS']='on';

Rewrites should be enabled even if its only a http site (fight me)

  1. enable rewrites
# a2enmod rewrite
# systemctl restart apache2

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

No response

🔄 Steps to reproduce the issue.

press enter

Paste the full error output (if available).

404, too many redirects, rest issues etc

🖼️ Additional context (optional).

No response

Originally created by @lavacano on GitHub (Feb 10, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? wordpress ### 📂 What was the exact command used to execute the script? bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/wordpress.sh)" ### 📝 Provide a clear and concise description of the issue. a few finishing things need to be done to have a /functioning/ wordpress site in the year of our lord 2025 **I like to name my lxc's hostname their site fqdn these 2 are for https reverse proxy** 1) modify /etc/hosts ``` # --- BEGIN PVE --- xxx.xxx.xxx.xxx hostname.domain hostname # --- END PVE --- change xxx.xxx.xxx.xxx to your reverse proxy ip, where hostname.domain is the website you are hosting. ``` 2) into wp-config.php: ``` if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on'; ``` **Rewrites should be enabled even if its only a http site (fight me)** 3) enable rewrites ``` # a2enmod rewrite # systemctl restart apache2 ``` ### ⚙️ What settings are you using? - [ ] Default Settings - [x] Advanced Settings ### 🖥️ Which Linux distribution are you using? _No response_ ### 🔄 Steps to reproduce the issue. press enter ### ❌ Paste the full error output (if available). 404, too many redirects, rest issues etc ### 🖼️ Additional context (optional). _No response_
OVERLORD added the not a script issuenice to have labels 2026-02-04 19:04:31 +03:00
Author
Owner

@MickLesk commented on GitHub (Feb 10, 2025):

This is generally not a script topic. Wordpress runs as state-of-the art. At most, a tutorial would make sense. I, for example, never use my DEV Wordpress with the hostname.

Off the top of my head, I don't see why this should be fixed in the system (etc/hosts) via script. Or what do you think @community-scripts/contributor ?

@MickLesk commented on GitHub (Feb 10, 2025): This is generally not a script topic. Wordpress runs as state-of-the art. At most, a tutorial would make sense. I, for example, never use my DEV Wordpress with the hostname. Off the top of my head, I don't see why this should be fixed in the system (etc/hosts) via script. Or what do you think @community-scripts/contributor ?
Author
Owner

@lavacano commented on GitHub (Feb 11, 2025):

the first 2 suggestions should they end up in a tutorial should also be accompanied with the following:

in /wp-admin/options-general.php amend WordPress Address (URL) and Site Address (URL) to reflect https://fq.dn where https is https and fq.dn is the wordpress site is accessible. This action should log the user out since the cookies for login are now stored at a new address.

should the rewrite suggestion also fail to make it to the script the permalink structure needs to be changed most likely after enabling it if mod-rewrite hadn't been enabled since install.

in /wp-admin/options-permalink.php ammend Permalink structure to be any other option than is currently selected. navigate to a page and confirm its uri is being rewritten (ie no index.php? in its path)

@lavacano commented on GitHub (Feb 11, 2025): the first 2 suggestions should they end up in a tutorial should also be accompanied with the following: in `/wp-admin/options-general.php` amend `WordPress Address (URL)` and `Site Address (URL)` to reflect `https://fq.dn` where https is https and fq.dn is the wordpress site is accessible. This action should log the user out since the cookies for login are now stored at a new address. should the rewrite suggestion also fail to make it to the script the permalink structure needs to be changed most likely after enabling it if mod-rewrite hadn't been enabled since install. in `/wp-admin/options-permalink.php` ammend `Permalink structure` to be any other option than is currently selected. navigate to a page and confirm its uri is being rewritten (ie no `index.php?` in its path)
Author
Owner

@michelroegl-brunner commented on GitHub (Feb 11, 2025):

I think the current system is the most usefull one so it can work out of the box.

We can never archive all user wishes with this scripts. Some others will have other preferences.
We have "helper-scripts" not do it all for you scripts after all.

@michelroegl-brunner commented on GitHub (Feb 11, 2025): I think the current system is the most usefull one so it can work out of the box. We can never archive all user wishes with this scripts. Some others will have other preferences. We have "helper-scripts" not do it all for you scripts after all.
Author
Owner

@MickLesk commented on GitHub (Feb 11, 2025):

You are welcome to write a guide in Discussions. It's “too much” for me, as I don't need it. Feel free to add to the community with your knowledge about the LXC, then we can also add it directly to the website as a tip (https:// - link to the guide)

@MickLesk commented on GitHub (Feb 11, 2025): You are welcome to write a guide in Discussions. It's “too much” for me, as I don't need it. Feel free to add to the community with your knowledge about the LXC, then we can also add it directly to the website as a tip (https:// - link to the guide)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#467