Front End Image Uploading Not Working

I have two plugins one for like a StackExchange like Q&A and another that allows images to be uploaded in Wordpress post and page comments from the front end. I try to upload an image on both a Question Post and in the comment box of a blog post, but it doesn’t show up in the posted message.

What are some diagnostic steps I should take to find out what’s going on?

Could it be a file permissions setting or nginx config?

This was working fine before on my previous apache setup

@JDdiego

Need to know which type of site you are running.

So, can you give me the output for ee site show example.com

and also provide logs.

OK, I’ll get that ASAP, also I noticed the upload file path for one of the plugins is the following:

/var/www/example.com/htdocs/wp-content/sabai/File/files

Does that look right?

Here is the output for :

ee site show example.com

server {

server_name example.com www.example.com;

access_log   /var/log/nginx/example.com.access.log rt_cache;
error_log    /var/log/nginx/example.com.error.log;

root /var/www/example.com/htdocs;
index index.php index.htm index.html;

include common/php.conf;
include common/wpcommon.conf;
include common/locations.conf;

I am little new to command line, can you walk me through on outputting the necessary logs?

@JDdiego,

ee site log example.com willl help you to find your site logs

  ==> /var/log/nginx/example.com.access.log <==
106.244.4.147 0.014 - [26/Nov/2014:00:52:29 -0500] example.com "GET /wp-admin/load-styles.php?c=0&dir=ltr&load=dashicons,admin-bar,wp-admin,buttons,wp-auth-check,farbtastic,wp-color-picker,wp-pointer&ver=4.0.1 HTTP/1.1" 200 72444 "http://example.com/wp-admin/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36"
106.244.4.147 0.010 - [26/Nov/2014:00:52:29 -0500] example.com "GET /wp-admin/load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,json2,farbtastic&ver=4.0.1 HTTP/1.1" 200 39996 "http://example.com/wp-admin/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36"
106.244.4.147 0.019 - [26/Nov/2014:00:52:30 -0500] example.com "GET /wp-admin/load-scripts.php?c=0&load%5B%5D=jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-slider,jquery-ui-sortable,jquery-ui-tabs,thickbox,underscore,shortcode&load%5B%5D=,media-upload,hoverIntent,common,admin-bar,wp-ajax-response,jquery-color,wp-lists,quicktags,jquery-query,admin-comments,postbox,&load%5B%5D=dashboard,customize-base,customize-loader,plugin-install,svg-painter,heartbeat,wp-auth-check,jquery-ui-draggable,jquery-touch-pu&load%5B%5D=nch,iris,wp-color-picker,suggest,jquery-ui-position,wp-pointer,jquery-ui-datepicker,word-count,wplink&ver=4.0.1 HTTP/1.1" 200 85060 "http://example.com/wp-admin/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36"
106.244.4.147 3.492 - [26/Nov/2014:00:52:30 -0500] example.com "GET / HTTP/1.1" 200 17486 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36"
106.244.4.147 1.414 - [26/Nov/2014:00:52:32 -0500] example.com "GET /wp-admin/admin-ajax.php?action=dashboard-widgets&widget=dashboard_primary&pagenow=dashboard HTTP/1.1" 200 795 "http://example.com/wp-admin/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36"
106.244.4.147 1.688 - [26/Nov/2014:00:53:32 -0500] example.com "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 78 "http://example.com/wp-admin/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36"
106.244.4.147 1.660 - [26/Nov/2014:00:54:33 -0500] example.com "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 78 "http://example.com/wp-admin/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36"
106.244.4.147 1.654 - [26/Nov/2014:00:55:34 -0500] example.com "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 78 "http://example.com/wp-admin/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36"
106.244.4.147 1.720 - [26/Nov/2014:00:56:35 -0500] example.com "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 78 "http://example.com/wp-admin/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36"
106.244.4.147 0.653 - [26/Nov/2014:00:57:34 -0500] example.com "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 78 "http://example.com/wp-admin/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36"

once you enter that command how do you exit the output and get back to the command line prompt?

The issue I am having is with this plugin, which allows images to be uploaded in wordpress comments from the front end:

  • This plugin is supposed to upload images to the media library.
  • When I try to use it the comment text displays but not the image when I inspect the source code for the comment, it says: <img src="" alt="">
  • So it looks like the image gets blocked from uploading.

However, when I use this competitor plugin, which uploads images to its own directory in wp-content, it works fine, and when I check the source comment source code it looks like this: <img src="http://example.com/wp-content/comment-image/21-tn.jpg">

Does the default easyengine settings not allow content to be uploaded to the media library from the front end? If so, is there a way to allow the plugin to do this?

EasyEngine allows you to upload to anywhere at all paths where www-data user has permission to write. Like /var/www/exmaple.com/htdocs/, So I hope if your media libray folder inside that then it is also allowed to upload images. You can check your error log ( if there any ) to see that while uploading that plugin gives any error or not. To check error log use ee site log example.com command

Hello @JDdiego

It’s been a long time, and we haven’t heard from you. It looks like your issue is resolved.

I am closing this support topic for now. Feel free to create a new support topic if you have any queries further. :slight_smile: