Enhancing Skills

Bitnami WordPress add upload file extensions

To add file extensions “properties” and “CSV” to the list of valid uploaded file types in a Bitnami WordPress container running on Docker, you can follow these steps:

  1. Connect to the container using a terminal by running the following command:
   docker exec -it CONTAINER_NAME bash

Replace “CONTAINER_NAME” with the name or ID of the running container.

  1. Navigate to the WordPress installation directory by running:
   cd /opt/bitnami/wordpress
  1. Edit the “wp-config.php” file using a text editor such as nano or vim:
   nano wp-config.php
  1. Add the following lines of code to the file, just before the line that says “/* That’s all, stop editing! Happy blogging. */”:
   define('ALLOW_UNFILTERED_UPLOADS', true);
   define('ALLOW_UNFILTERED_UPLOADS_EXT', 'csv,properties');

The first line enables unfiltered uploads, allowing all file types to be uploaded. The second line specifies the allowed file extensions, separated by commas.

  1. Save the file and exit the text editor.
  2. Restart the container for the changes to take effect:
   docker restart CONTAINER_NAME

Replace “CONTAINER_NAME” with the name or ID of the running container.

After following these steps, you should be able to upload files with the extensions “properties” and “csv” to your Bitnami WordPress container.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.