Limit max upload file size in front end submmission form

You have some ways to do that: In your functions.php or wp-config.php @ini_set( ‘upload_max_size’ , ’15M’ ); @ini_set( ‘post_max_size’, ’15M’); @ini_set( ‘max_execution_time’, ‘300’ ); In your .htaccess (if you use apache2) php_value upload_max_filesize 15M php_value post_max_size 15M php_value max_execution_time 300 php_value max_input_time 300 If you use nginx http { client_max_body_size 15m; } In your php.ini … Read more

Cannot upload themes. Error: “The uploaded file could not be moved to /var/www/wp-uploads/localhost/2011/10.”

From quick search of source for this error message, it is likely to be triggered by failed move_uploaded_file() function call, which is native PHP and not WordPress. Documentation says that it has some restrictions, related to safe_mode and open_basedir so that might be your issue. Since WP suppresses error output from this function with @ … Read more

http upload error as a subscribed user

The Subscriber user role does not have write permissions. http://codex.wordpress.org/Roles_and_Capabilities#Subscriber Perhaps you should give the user the Contributor role. Contributor delete_posts edit_posts read http://codex.wordpress.org/Roles_and_Capabilities#Contributor

wp_handle_upload Image sizes

I hope I understood your question correctly. Image size are automatically generated according to thumbnail sizes set. For this to work correctly, you first need to add support for thumbnails, and then add any image size that you need inside your theme. It is also important to know that you first add theme support and … Read more

Media upload error

I found the solution. Rename your function.php file. Now it works fine for other themes. In my theme exactly the problem lies between the style tag. remove style tags and then check your admin panel. Thanks.

Rename file after title , one small problem

Use get_the_title() since you’re already being passed a post ID. function rename_attacment( $post_ID ) { $post = get_post( $post_ID ); $file = get_attached_file( $post_ID ); $path = pathinfo( $file ); //dirname = File Path //basename = Filename.Extension //extension = Extension //filename = Filename $newfilename = get_the_title( $post_ID ); $newfile = $path[‘dirname’] . “https://wordpress.stackexchange.com/” . $newfilename … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)