Staging Site (on virtual host) isn't allowing me to add media files

Hello there!

I finally managed to set up a virtual host so that I can have a staging environment to re-design my website.

I already downloaded WordPress, I added the Pro theme and finished the validation.

I was in the middle of trying to design my new header and I then realize that I can’t add my logo. Or any other media file for that matter.

I’ve added different plugins and they seem to be working just fine.

How do I fix this?

Thank for the help in advance!

Hi Phillip,

Thank you for writing in, please do the following

  • Ensure that you are fully up to date. WordPress, Theme, and Cornerstone (Version Compatibility)

  • Clear all the site caches (plugin, server-side, CDN, and browser’s cache) so that the code from the latest release is always in use. This will help you to avoid any potential errors. Please deactivate this caching features while we tackle this issue.

  • Test for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

  • Remove custom Javascript and custom templates (if any).

  • Reset your .htaccess file by renaming it to .htaccess-bak. Then in WP Admin Menu, go to Settings > Permalinks and just click the Save Changes button.

  • Contact your hosting provider to increase your allocated memory limit or do it yourself by adding this code in your wp-config.php file.

define( 'WP_MEMORY_LIMIT', '512M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

You can add it before the line:

/* That’s all, stop editing! Happy blogging. */

Increasing PHP Memory Limit

If the issue persists, please provide us the site URL and credentials in a Secure Note so we can take a closer look.

Let us know how it goes,
Cheers!

  1. Wordpress and my theme are up to date.
  2. I don’t know how to clear my site cache when I’m working with a virtual host. I cleared the browser cache.
  3. I deactivated all plugins and still have the same issue. It’s not allowing me to drop any images or see them when I search for them through the “Select Files” button.
  4. There is no custom Javascript or custom templates.
  5. When I try to rename my .htaccess file it tells me the following, “You must type a file name”.
  6. I am not using a hosting provider, I’m using WAMP after setting up a virtual host to try and prepare a staging environment where I can re-design my website from the ground up.

Would sending you the following text files help?
C:\wamp64\bin\apache\apache2.4.35\conf/httpd
C:\wamp64\bin\apache\apache2.4.35\conf\extra/httpd-vhosts
and my Windows hosts text file?

I would just like to finally get this set up so that I can have a proper staging environment. I’ve had this theme for years and haven’t been able to do any offline development. Trying to figure out how to set up this virtual host has been quite a lot of hassle in my spare time.

Hello Phillip,

Thanks for updating in!

Please make sure that the WordPress dashboard url of your staging host is the same as the site URL and WordPress address url settings in Settings > General.

And lastly, please make sure that you have file permissions over the images.
This links might help:

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.