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/");
Related Posts:
- How to catch/what to do with a WP Error Object
- What are the best practices for updating?
- Resizing all images
- PHP Deprecated: Non-static method should not be called statically
- Automatically Import Image into Posts from URLs on the Web?
- How can I attach images to a post from the media library?
- Rename existing old uploaded images containing accented French characters (not during upload)
- Thumbnail with different sizes
- An Unexpected HTTP Error occurred during the API request
- Disabling post images for not logged in users
- How to upload thousands of images?
- There’s some way to add a wrapper around posted images?
- How to get CMB2 to show a single image at a specific size
- How to limit 1 image per post on homepage only?
- Getting media library popup in custom plugin admin page
- How to change ID of an attachment in wp_posts and its related tables correctly?
- bulk change of image setting “link to” to “link to: image url “
- Regenerate images with automatic ALT and TITLE attributes
- Unable to activate wordpress importer after installing it
- Weird problems after recovery from security breach
- Can a plugin still effect a site even after deletion?
- Call to undefined function get_userdata in user.php
- Only Homepage not loading properly
- Inserting HTML tag with ACF into shortcode
- One of my plugins broke when I tried to update it, how do I safely uninstall it?
- Preview featured image using frontend post plugin
- How to Delete all Unused photos Function
- How to resize images due to container width automatically server side/without CSS
- How to redirect a URL with parameters?
- How to create a managed image repository in wordpress
- Problem using Press-this book marklet
- Nonce failing on form submission
- wp_generate_attachment_metadata is creating an empty array
- Uncaught TypeError: jQuery(…).flipster is not a function in wordpress
- Contact Form 7 Get Image Function [closed]
- Load external images via proxy
- Deactivating all plugins and reactivating one by one, fixes conflicts. Why?
- WordPress shows error related to allow_url_fopen
- Implementing an image hosting website using WordPress? [closed]
- Redirect to another page using contact form 7? [closed]
- Can’t activate Plugin: unexpected T_STRING, expecting T_FUNCTION [closed]
- Photo Gallery Plugin and Touch Devices
- XML Sitemap Generator can’t notify google and bing
- How to limit image size for the entire website ? But without editing the post (css/plugin?!)
- UTF-32be error WordPress
- Elementor page builder plugin not loading up all the way? [closed]
- Blurry images when loading the page first time
- Plugin showing error
- Classic, but puzzling “The uploaded file could not be moved”
- Search by Attachment ID
- Problem after updating plugins
- Overwrite add_image_size defined by theme
- Apparent errer when installing plugin
- Some images on WordPress site are suddenly gone
- Undefined index: ratings_score …/wp-postratings.php on line 994
- Simple sildeshow/image-upload plugin?
- Error activating certain plugins
- All new plugins generating 311 chars of unexpected output?
- how to remove share button from image overlay
- Optimal image size for wordpress?
- Is classical wordpress eidtor a good option for me to include a large table with a large number of images on my webpage?
- insert og image link in wordpress post
- WP search box on page not finding .PDF files
- Optimise wordpress database using SQL after deleting registered images from Media Folder
- Changing wordpress/woocommerce notices default message to other languages (text)
- Displaying all the images from all of my articles
- Product Page loads terribly slow when product gallery images are added
- Critical Error after Updraft Restoration
- There has been a critical error on your website
- I can’t view the orders on the woocomerce dashboard with the brainblocks plugin
- WordPress how do I change images used in plugins?
- Why is my site still showing insecure icon even if I have SSL certificate?
- ERROR message: “The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.”
- Object of class WP_Error could not be converted to string in /formatting.php
- Help finding a plugin – masonry type post grid
- Cannot modify header information – headers already sent during plugin activation
- How to wrap image tag into div for post only?
- Insert Sponsor logo in custom own theme
- Optimize and delete images in WordPress
- Upload image to wordpress using ionic/cordova with WP REST API V2
- WP default file upload hook not working if used in a plugin
- Is there any hook to change media html in post? [duplicate]
- Add image to post
- How to force regenerate thumbnails in WordPress posts?
- resizes images on the fly
- How to select featured images for 1500 posts?
- A plugin is giving me “You do not have sufficient permissions to access this page.” error
- Restore Category Base
- Display alt text as tool tip on page
- Adding Relevant Post Images
- Image Layout in Posts
- Is there a WordPress Plugin like Imsanity that keeps high resolution originals? [closed]
- WordPress Customer Reviews Error: Line 239?
- WordPress Plugin: Demon Image Annotation
- WordPress Plugins Error
- How to get an error message if a form is empty (plugin: Post for site) [closed]
- how to embed a crop feature for cropping images uploaded by the user
- How to show image caption in Woocommerce gallery
- Oxygen plugin wordpress stuck in loading sequence forever when trying to edit a page [closed]
- LiteSpeed cache image Optimization