WordPress media upload multiple images

Make sure the permissions for the upload folder are set correctly, and that none of WordPress’s files have been deleted. Also, try disabling all plugins. If it still doesn’t work, try adding this to the .htaccess file: <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule> Test and see if it will work on a small image, … Read more

upload file with front-end submission and forward the data in an email

In case anyone needs this, here is my solution: if ($_FILES) { function insert_attachment($file_handler, $post_id, $setthumb = ‘false’) { if ($_FILES[$file_handler][‘error’] !== UPLOAD_ERR_OK) __return_false(); require_once(ABSPATH . “wp-admin” . ‘/includes/image.php’); require_once(ABSPATH . “wp-admin” . ‘/includes/file.php’); require_once(ABSPATH . “wp-admin” . ‘/includes/media.php’); $attach_id = media_handle_upload( $file_handler, $post_id ); //get url $attachment_url = wp_get_attachment_url($attach_id); add_post_meta($post_id, ‘_file_paths’, $attachment_url); $attachment_data = … Read more

Metabox with file upload to custom directory

I will not follow the whole metabox thing, but Just to point some ” leads ” as you asked regarding the upload folder .. The upload dir in wordpress is set via the wp_upload_dir() function – which is filterable .. $uploads = apply_filters( ‘upload_dir’, array( ‘path’ => $dir, ‘url’ => $url, ‘subdir’ => $subdir, ‘basedir’ … Read more

owner/group issue on server

The code should be owned by the FTP User and Group, but then have permissions set wide enough to allow the webserver to read the files. Typically this is 644 for files and 755 for directories. More information: http://codex.wordpress.org/Changing_File_Permissions#Permission_Scheme_for_WordPress

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