Tag Info

New answers tagged

0

If those images have been inserted in your posts, deleting them from the Media Library will cause blank spaces with a broken image icon to appear in your posts. If you need/want to add alt text or change image file names, etc., better to do so directly in the Media Library than to delete existing images and then upload them again. If you do this, you will ...


2

AFAIK, this 2Mb limit is not set by Wordpress, but rather a php default limit set in php.ini. As for the specific reason why, I cannot tell you, but my guess would be that it has something to do with webhosting companies. Before you change any of the defaults like upload size, it is always always a good idea to check with your host and checking what are ...


1

There's no harm increasing file upload size. Now-a-days we all need to increase it as the default is insufficient. Please feel free to increase it. You can also talk with your hosting provider to increase the upload size. There are many ways to do so. Locate theme's function and add below lines: @ini_set( 'upload_max_size' , '64M' ); @ini_set( ...


0

It seems like you are creating the folder on main site and trying to read from it on a sub site. This is not the right way to go, remeber that on multisite each site, except for user management, is almost 100% isolated full wordpress that has no easy access to data from other sites. Assuming there should be only one such file in the system, What you ...


0

You can try this plugin: https://wordpress.org/plugins/optimize-images-resizing It resizes images based on your registered image size, but only when needed. Also can cleanup existing image sizes so they can regenerate.


0

I think your software is not good solution for your problem. Use FileZilla to upload wp on a Server.


0

You can't hook it directly as wp.Uploader doesn't expose it but you can use its init() to hook its internal pluploader instance: add_action( 'admin_print_footer_scripts', function () { ?> <script type="text/javascript"> (function ($) { if (typeof wp.Uploader === 'function') { $.extend( wp.Uploader.prototype, { ...


0

something like this : https://codex.wordpress.org/Function_Reference/add_role then if ( current_user_can('new_role') && !current_user_can('upload_files') ) add_action('admin_init', 'allow_new_role_uploads'); function allow_new_role_uploads() { $new_role = get_role('new_role'); $new_role->add_cap('upload_files'); }


0

In the wp-config.php file (wordpress's root folder) you have to enable the debug. You have to set wp_debug to true. Change define('WP_DEBUG', false); to define('WP_DEBUG', true); Save the file and refresh the browser (I suggest you to use ctrl+f5). You'll see all the errors.


0

This likely isn't exactly an issue caused by WordPress, but due to server configurations and/or settings. 500 errors are pretty generic and can have a variety of origins, so it is hard to give the one directive that will solve it. By the way, the returning of JSON and HTML seems to be common when this happens, not sure where and it gets mixed up, might be ...


0

So I couldn't upload more that 20 pictures per post, that was the issue. I had to ask my host to modify max_file_uploads Servers are usually set at 20 uploads at a time so if you want more, just ask your hosting service of modify it in php ini.


1

Try editing the post_max_size variable, if you have access to your php.ini file. This variable is the limit of the entire body of the request, which could include multiple files (source - stackoverflow). If you don't have access to it you can try editing your functions.php file and add: @ini_set( 'post_max_size', '64M'); //this will set 64mb as limit If ...


0

Instead of removing upload script you can make the upload error out if the user does not have admin privileges. Like this- function tomjn_only_upload_for_admin( $file ) { if ( ! current_user_can( 'manage_options' ) ) { $file['error'] = 'You can\'t upload images without admin privileges!'; } return $file; } add_filter( ...


1

You setup a Wordpress site in a subdirectory/subdomain or any url of your choice. So, the path structure is up to you. Add all the files and database info in this site. Activate the same plugins and themes. Disable search engine indexing for this site. Set up so that published posts and everything else on the live site are added automatically in this site ...


2

In this case i will do: create a new folder inside website root folder (ex: mynewsite) create a new db and import the old website db to it copy old website files and folders to the new directory (mynewsite) change db name, user etc in wp-config on mynewsite folder define site url by adding to wp-config.php ...


0

If some one it's still looking for a solution, this solution worked for me for all upload images in any post types and on featured images as well: function upload_media_manager_by_default() { if ( did_action( 'wp_enqueue_media' ) ) { ?> <script type="text/javascript"> jQuery( document ).ready( function ( $ ) { ...



Top 50 recent answers are included