.htaccess is emptied during the initial setup - as intended?
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with the image ENTRYPOINT script and compare its handling of /usr/src/wordpress/.htaccess and /var/www/html/.htaccess before and after the initial setup. Trace the WordPress setup path that rewrites the file; done means confirming whether the empty managed block is intentional and identifying the relevant fix or documentation if it is not.
Written by the indexing model from the issue text.
Description
The contents of /usr/src/wordpress/.htaccess in wordpress:latest (6.1.1-php8.0-apache as of writing this) are the following:
$ docker run -ti --entrypoint '' wordpress:latest cat /usr/src/wordpress/.htaccess
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
During the initial docker run --name wordpress <your options go here> wordpress:latest, the ENTRYPOINT script copies /usr/src/wordpress/.htaccess as it is into /var/www/html/:
$ docker exec wordpress /bin/sh -c "cat /var/www/html/.htaccess"
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
After I open my WP page in a browser and complete the initial setup, I notice that all those rewrite settings are now gone:
$ docker exec wordpress /bin/sh -c "cat /var/www/html/.htaccess"
# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END WordPress
Is that as intended?
- Dominant language
- Shell
- Stars
- 2k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docker-library/wordpress
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
docker-library/wordpress#959 · 1 comment · 2 reactions ·
-
New php-latest tag Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
docker-library/wordpress#930 · 6 comments · 4 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
docker-library/wordpress#927 · 3 comments · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
docker-library/wordpress#862 · 7 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
docker-library/wordpress#835 · 2 comments · 2 reactions ·
All issues in docker-library/wordpress
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug easy help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
lacs-project/sysknife#503 ·
-
help wanted kind/documentation
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
liquidmetal-dev/flintlock#1239 ·