Images not showing after changing wp-content folder name

The safe way to change wp-content folder, is the following:

First, define the new wp-content name in your wp-config.php file:

define ('WP_CONTENT_FOLDERNAME', 'hamza');

Then, define the new path for images, style, scripts, etc:

define ('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME) ;

define('WP_CONTENT_URL', WP_SITEURL . WP_CONTENT_FOLDERNAME);

This will allow your plugins and other stuff to be notified about the change of your wp-content folder.

You might also want to define your site URL too if the above wasn’t sufficient:

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . "https://wordpress.stackexchange.com/");