Azure / wordpress-linux-appservice

MIT License
96 stars 65 forks source link

Blob media uploaded in Azure Portal not visible on app #156

Closed victorlin closed 6 days ago

victorlin commented 1 week ago

First off, thank you for the various documentation in this repo – it's been helpful in setting up and configuring a Wordpress site on Azure for the first time.

Following this advice:

You can upload media files to the blob storage using the WordPress Admin dashboard (Media -> Add New) or the Azure Portal. In Azure Portal, you can find the storage account resource in the same resource group where your WordPress App Service is deployed. Go to the storage account and select 'Containers' under 'Data storage' section. Open the appropriate blob container and click on Upload option shown at the top.

I am able to upload media files using the Wordpress Admin dashboard and it appears in Blob storage.

However, when I upload a media file directly to the storage account in Azure portal as wp-content/uploads/2024/07/test.png, it does not show up in the Wordpress Admin dashboard nor filesystem (expecting /home/site/wwwroot/wp-content/uploads/2024/07/test.png).

Is there some extra configuration that I am missing?

saisubodhMSFT commented 6 days ago

@victorlin When media files are uploaded to WordPress, a reference to it is stored in the database. When you upload a media file to blob storage this reference in database is not created because of which you can't see the files in WordPress dashboard or filesystem.

Thanks for pointing out this. We will correct our documentation.

saisubodhMSFT commented 6 days ago

If you still want this to work where files uploaded to blob storage are detected in WordPress, you can explore this blog on "Add from Server" plugin