Wordpress media library empty using lamp stack with vmware esxi

Keywords: WordPress - Virtual Machines - Technical issue - Other

bnsupport ID: 275d2c8b-0756-37f8-a12a-9b1c81e4c9e8

bndiagnostic output:

? Resources: Found possible issues
? Mariadb: Found possible issues
? Apache: Found possible issues

bndiagnostic failure reason: I do not know how to perform the changes explained in the documentation

Hi i just installed a few wordpress sites using lamp stack, but i cant see my media library for some reason. Could you please help me? thank you

Hi @agaitan026,

Thanks for using Bitnami. I checked your bnsupport bundle information and I see your machine is running out of free memory. Can you increase the virtual machine’s memory available?

Display amount of free and used memory in the system
Running: free -m
In: /opt/bitnami


              total        used        free      shared  buff/cache   available
Mem:            482         304          17          70         160          95
Swap:           634         327         307

Apart from that, I see you are installing your websites in the apache2/htdocs folder. We recommend installing those custom PHP applications in a different way that make each application independent of each others. Unfortunately, we can’t provide support for the apps installed in the apache2/htdocs directory, because it may lead to a big combinations of configurations. Our configuration tips pretends to isolate each configuration to debug issues in an easier way. You can get more information on this in the guide below


1 Like

Correct, just configure more memory. And what about i need each wordpress to be with diff subdomain example


Each with diff wordpress site

Ok i just did what you recommend me moving of of htdocs.


also im getting this on apache logs

[Fri Jul 16 14:33:51.656985 2021] [proxy_fcgi:error] [pid 8530:tid 140698686404352] [client] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /opt/bitnami/mega/wp-includes/media.php:4044\nStack trace:\n#0 [internal function]: wp_prepare_attachment_for_js()\n#1 /opt/bitnami/mega/wp-admin/includes/ajax-actions.php(2993): array_map()\n#2 /opt/bitnami/mega/wp-includes/class-wp-hook.php(292): wp_ajax_query_attachments()\n#3 /opt/bi

tnami/mega/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters()\n#4 /opt/bitnami/mega/wp-includes/plugin.php(484): WP_Hook->do_action()\n#5 /opt/bitnami/mega/wp-admin/admin-ajax.php(187): do_action()\n#6 {main}\n thrown in /opt/bitnami/mega/wp-includes/media.php on line 4044’, referer: https://test.subdomain.com/wp-admin/upload.php

Hi @agaitan026,

I see you updated the memory, thank you for checking. For installing three different WordPress sites you need to follow our guide three times, one for each site. I’m afraid I don’t know what the error you are getting means, but I’d like to get some more information about your installation.

For example, you didn’t create an /opt/bitnami/apache2/conf/vhosts/myapp-vhost.conf file for any of your apps, only for the HTTPS virtualhost. However, creating both files per site (myapp-vhost.conf and myapp-https-vhost.conf) is needed.

I also see you added the next lines in your myapp-https-vhost.conf files, however I don’t understand why these lines are needed. They aren’t mentioned in our guide either. Can you tell us why?

  # BEGIN: Configuration for letsencrypt
  Include "/opt/bitnami/apps/letsencrypt/conf/httpd-prefix.conf"
  # END: Configuration for letsencrypt

Can you also double check you set the correct permissions to your WordPress files? Replace my-app with your application names.

sudo chown -R bitnami:daemon /opt/bitnami/myapp
sudo chmod -R g+w /opt/bitnami/myapp

It would be also of help if you share with us the result of running the next commands for your apps. Again, replace myapp with the real name

ls -lart /opt/bitnami
ls -lart /opt/bitnami/myapp