45mb File Exceeds the Maximum Execution Time

No it’s not. Unless you have a connection that is being interrupted, or is very slow. Here is what you can do: Option 1 Increase the PHP max execution time. Ask your host provider to increase it, or if you have access to it, update this line in your php.ini file: max_execution_time = 999 Option … Read more

WP_Custom_Media_Control | Give ID to media file

The setting associated with the media control will have the ID for the attachment stored as its value. Assuming you have registered a setting for your control like this: $wp_customize->add_setting( ‘resume’, array( ‘type’ => ‘option’, // … ) ); Then you would obtain the attachment ID just by reading from the option, like: get_option( ‘resume’ … Read more

Creating an Uploads folder with post ID

I wrote this code for you: global $lesson_id; $lesson_id = $_POST[‘lesson_id’]; function create_uploads_folder() { global $lesson_id; $upload_dir = wp_upload_dir(); $upload_dir = $upload_dir[‘basedir’]; $upload_dir = $upload_dir . ‘/submissions/’. $lesson_id; if ( ! is_dir( $upload_dir ) ) { wp_mkdir_p( $upload_dir ); } } register_activation_hook( __FILE__, ‘create_uploads_folder’ ); // Upload file $uploadFolder = wp_upload_dir(); if ( ! move_uploaded_file($_FILES[‘file_upload’][‘tmp_name’], … Read more

What folder to place Large Video files?

WordPress doesn’t process uploaded files directly from file system, it stores information about them as attachments in database. If you need to turn a directly uploaded file into an attachment the term for it would be a sideload. There are some API functions in WP to help with the task, starting with media_handle_sideload(). Also note … Read more

Import all media referenced in posts

Can I use get_attached_media() to get the images referenced on a page, even if they’re not formally attached? No, if they’re not attached they won’t be attached. I assume you’re talking about images in your posts that are offsite? If so, you need to download them, create an attachment post, attach it to the post, … Read more

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