Images are not displayed in wordpress media Library - wordpress

Actually I am facing an error while uploading the images and insert it into post in wordpress.
Here I am Unable to view the uploaded images in the Media Library

Try to check permission of that "upload" folder, give 777 or remove read only from whole subfolders of "upload" folder.
give 777 to "upload"
Thanks

Even after changing the permission to 777 i couldn't get it working in my latest wordpress 3.9.1 fresh install. Then i found out that my custom theme was out dated and i had to add the below line in functions.php file inside my custom theme folder
wp_enqueue_script( 'jquery-ui-dialog', false, array('jquery'), false, true );
I found that from this link --> http://wordpress.org/support/topic/add-media-functionality-on-391-not-workingg
Hope that helps.

Related

Elementor Not Loading On WordPress Subdirectory Installation With Composer

WordPress in its own directory using Composer
Troubleshooting Elementor Infinite Loading Screen
Inspired by roots/bedrock, I started a project to install WordPress to its own subdirectory using Composer. Plugins and Themes are installed from WPackagist, separately from the core WordPress files, also using Composer.
I ran into an issue with Elementor, which was stupid simple to fix. However, when I was in the process of fixing it, my Stack Overflow query, 'wordpress composer “elementor” -visual', returned nothing interesting. So I set out to write a quick troubleshooting guide for my own oversight. I have been obsessed with using Composer for WordPress dependencies lately, so I'm excited to write about it.
Anyway, after setting up the WordPress core and plugins using Composer, and setting up my database credentials in wp-config, I can login to the dashboard just fine.
Here's the Issue
In the dashboard, I see an issue immediately; the Elementor icon is missing, showing a generic gear instead. Here is the first clue that Elementor cannot find its own assets.
Furthermore, when I try to create a new page in Elementor, I see only an infinite, white Loading screen. Additionally, the "Edit with Elementor" button is missing when creating new posts and pages.
Initial Debugging Methods
Turn on PHP debugging in wp-config.php -> Revealed nothing enlightening.
Remove all other plugins besides Elementor -> No changes.
Turn on Safe Mode in Elementor > Tools -> Revealed nothing enlightening.
What next?
I will tell you how I fixed this issue.
Developer Console Insights
To finally resolve this issue, I opened the developer console (CTRL+SHIFT+I) and inspected some of the 404 links in the Network tab. An issue was immediately apparent: the filepath was incorrect. My project's folder is called "subdir-wp-elementor", not "subdir-wordpress".
Here is what Elementor was trying (and failing) to load:
http://localhost/subdir-wordpress/app/plugins/elementor/assets/js/editor-modules.min.js?ver=2.9.12
Resolution: Update CONTENT_URL in wp-config
I realized that I had forgotten to update the CONTENT_URL definition in wp-config.php
My SITE_URL was http://localhost/subdir-wp-elementor/, but here was my CONTENT_URL:
// ========================
// Custom Content Directory
// ========================
define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/app' );
define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/subdir-wordpress/app' );
Setting the correct CONTENT_URL to the below allowed Elementor to properly load.
define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/subdir-wp-elementor/app' );

Wordpress Upgrade failed. Admin panel not working

I wanted to Upgrade the Wordpress installation, I clicked on the Upgrade to latest version link from my WP ADMIN panel and post that it has asked me to give FTP details for the Update for which FTP details were entered and Upgrade started. After few minutes I got Below ERROR and Now WP ADMIN is not loading. I tried to clear browser cache and cookies but still not working. Please Help in resolving the issue.
There has been a critical error on your website. Please check your site admin email inbox for instructions.
Learn more about debugging in WordPress.
I have further tried to debug and added below code in wp-config but i am not getting any errors on the page neither in the path /wp-content/debug.log file
is there.
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
#ini_set( 'display_errors', 0 );
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );
Reference : https://wordpress.org/support/topic/wordpress-upgrade-failed-wp-admin-panel-not-working/
Dear users, please use manual update if you can’t update automatically.
See here:
Updating WordPress
You can do it with cpanel:
Simple copy wp-content & wp-config.php to a directory out of public_html (for example, create a folder by name “backupold” and put files in it)
Download latest version
https://wordpress.org/latest.tar.gz
Upload it in your wordpress directory (output file will be in public_html/wordpress for example)
Copy (backuped contents) “wp-content” folder & “wp-config.php” file to “wordpress” folder & replace
Move all files and folders from “wordpress” folder to your site directory (by default, public_html) & replace.
Now enjoy!
Warning: do a backup before, and do as i sayenter code here

Updating themes and plugins automatically

I want my plugins and themes to be updated automatically but I am unable to do it.
This guide says that you have to add
add_filter( 'auto_update_plugin', '__return_true' );
to the code, but I don't know where exactly should I add it. The guide also suggests to put it into mu-plugins but I have no idea how.
Can you please help?
1. Updating Wordpress core:
If you want the WordPress auto updates to handle major core updates too, you will have to add a single configuration line. To do this, open the wp-config.php file in the root folder of your WordPress installation and add this line to it:
define('WP_AUTO_UPDATE_CORE', true);
2. Updating Wordpress plugins:
If you want your plugins to be automatically updated by WordPress when a new version is released, you need to add a line to your wp-config.php file, similar to the one above. This time, however, a filter is used for enabling the plugin auto updates:
add_filter( 'auto_update_plugin', '__return_true' );
3. Updating Wordpress themes:
If you want WordPress to handle themes updates you need another line added to the wp-config.php file:
add_filter( 'auto_update_theme', '__return_true' );
If you are getting problem like this - Do not add add_filter() calls in wp-config.php - causes conflicts with WP-CLI and possibly other problems. Then should have to put these filters into mu-plugins
You can add this code to functions.php file in your theme folder, so use FTP to add this line to wp-contemt/themes/YOUR-THEME-NAME/functions.php

Wordpress upload theme

I was trying to install wordpres on my local computer. However, when I try to upload a theme or install some plugin using the web interface. It always prompts me to enter FTP credentials. I checked online, and it seems that ftp credentials is not necessary for uploading. I set the permissions for all directorieos and files under wp-content to be 777, but the problem is still there. And this Word press is a fresh installation on ubuntu 14.04( running in a VM) and newest wordpress.
Hi I got this issue before some time wordpress ask ftp detail when I was trying to install new plugin and get resolved by adding this code in my wp-config file.
define( 'FS_METHOD', 'direct');
Add this code to wp-config.php :
add_filter('filesystem_method', create_function('$a', 'return "direct";' ));
define( 'FS_CHMOD_DIR', 0751 );

Unable to upload new theme to wordpress from dashboard

I installed wp to a server for the first time. The basic theme works and I can change the settings but I bought a new wordpress theme and was trying to upload it from the dashboard:
But it gives me an error each time:
These were suggestions I found online but didn't work:
So I tried to change the permissions of all of the folders to 755. And then I changed the permissions of the file update.php to 755 also but I still get the same error. I also tried editing the .htaccess of the folder 'AALimo' (folder which contains the wp dir) but that didn't work either. I'm not sure if I edited the .htaccess properly.
I just manually uploaded the theme into the theme directory using ftp instead of the theme uploader from dashboard and that worked.
I did it using C-Panel. I had to upload zip file in WordPress theme folder in public html. extract the zip file and you can install it easily .

Resources