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:
- WordPress how do I change images used in plugins?
- Modifying server’s response to API endpoint
- Implementing Scrollable Images
- Woocommerce functions in custom class, avoid errors
- Remove special characters from filenames
- 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.”
- PDF Viewer Origin is Different
- Unable to activate themes on localhost
- Object of class WP_Error could not be converted to string in /formatting.php
- Error after installing the WordPress plugin updates
- Looking for Image Slider that is based on default WP Media Library
- White blank screen while adding or editing pages in wordpress
- Uploading images to custom table
- Help finding a plugin – masonry type post grid
- How to make cover image in post block expand to entire screen?
- Cannot modify header information – headers already sent during plugin activation
- WordPress website dont load CSS, JS and images
- WordPress error after installing plugin “Internal Server Error” [closed]
- How to wrap image tag into div for post only?
- Insert Sponsor logo in custom own theme
- Need Help Understanding Debug Log Errors
- How do I create a state of “don’t assign anything to variable” if WP_Error throws an error?
- flip horizontal images in bulk
- Does WordPress have a way of changing the ‘Natural’ size of uploaded images?
- WordPress Dashboard shows no plugins installed!
- ClassLoader.php issues after moving to a new host
- Plugin debugging with errors in activation routine
- 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
- How to Display image from Menu Image in Walker Dropdown Select Menu
- Warning: Illegal offset type in /var/www/html/wp-includes/option.php on line 1924
- How to validate field when create post
- Speed issues because of CSS & JavaScript
- Is there any hook to change media html in post? [duplicate]
- Add image to post
- How to force regenerate thumbnails in WordPress posts?
- A more elegant way to handle notices/warnings
- resizes images on the fly
- Theme Load Error
- Plugin Installation Error
- Images not showing on homepage after migration [duplicate]
- export high ress images to pdf
- Any way to edit/crop my featured image upon uploading?
- how to open image gallery in a post/page?
- Plugin installation error in wordpress
- adding image in the header of my dev widget
- How to select featured images for 1500 posts?
- A plugin is giving me “You do not have sufficient permissions to access this page.” error
- How to show post attachment image
- Restore Category Base
- Server Path Information
- Advanced Custom Fields (ACF) Plugin – Random Image in Sidebar
- Plugin (smart archives reloaded) crashed site / no access on admin panel
- Determine if get_the_image has image on Get the image Plugin
- Display alt text as tool tip on page
- Retrieve post thumbnails
- Custom Post type plugin breaking the front page shows dashboard?
- WordPress 3.5 install error
- Is there a plugin that will override the “Error establishing a database connection” message? [closed]
- Adding Relevant Post Images
- How to make plugin work in each template in wordpress
- Images not showing and plugins not installing on wordpress server move
- Plugin won’t activate, fatal error (widget class not found)
- HTTP Error 403 When Trying to Login
- Make a wordpress site similar to Hot Or Not – Image rating system [closed]
- Any plugins that upload, resize, and display images? [closed]
- Plug-in (Slickr Flickr) works on local machine, but not server
- Displaying single Instagram images as a tile
- How can I server scaled images?
- Why do I get this “peer’s certificate issuer not recognised” error when trying to install a theme?
- Adding hero images to blog posts
- Image Layout in Posts
- Fatal error with Ultimate Coupon plugin
- Theme causing SSL break on chrome
- How can I manage the background image of a slider based on the featured image of a page?
- The plugin generated xxx characters of unexpected output during activation
- getting image alt text via ACF plugin in WordPress [closed]
- 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 add “alt” for all image in wordpress
- Allow users to download media files directly from Amazon S3 (AWS plugin)
- Receiving error with Custom Tables plugin
- How should I force WordPress to give proper name for the uploading images?
- Images get uploaded itself from the computer
- How to display multiple images in the before and after plugin?
- Woocommerce resize existing product images
- How to Add a Website Background Image to One Page?
- How to get an error message if a form is empty (plugin: Post for site) [closed]
- Want to show pop up image on home page every time when i refresh it [closed]
- How can I send api calls from my plugin?
- how to embed a crop feature for cropping images uploaded by the user
- Console errors after WordPress Update 6.1
- How to show image caption in Woocommerce gallery
- WordPress error Fatal error: Uncaught TypeError: Argument 3 passed to Automattic :get_setting_for_feature() [closed]
- How can I resolve an error on WordPress after PHP update
- Achieve the following layout