Where is image information from WordPress stored?

WordPress is by default designed to categorize all uploaded files according to a certain scheme. All files uploaded via the media library are first loaded into the directory: ./wp-content/uploads and sorted there by year and by month. The subdirectory /wp-content a folder /uploads is used to store images and documents.

Changing and deleting image data afterwards

If the image data should be changed afterwards, this can be done either via the administration interface of WordPress or also by means of phpMyAdmin via the SQL database. However, WordPress beginners are recommended to choose the way via the administration interface, because the work within phpMyAdmin could damage the WordPress installation. In addition, it should be noted that when deleting images from the web server, the pictures while removed , the references in the SQL- Database however still continue to exist. For this reason, the image is referred to in the posts, on the pages or with regard to other content, but it is not displayed. The result in that case would be an error message or a browser hint that the image is not present. The configuration file "wp-config.php" offers the possibility to set various Setting options for the blog such as the path for saving images and documents.

Saving images and optimizing the directory

In order to store all image files in a folder "/images" directly in the WordPress main directory and to retrieve them later at www.redirect301.de/bilder/tolles-bild.jpg, the setting "define( 'UPLOADS', 'images' )" in wp-config.php is necessary. Another possibility is to create a separate directory of /wp-content, whereby the command "define( 'UPLOADS', 'wp-content/'.'images' )" must be entered. The configurations regarding month and year folders can still be used, which is especially recommended for many image uploads, or in the case of overlaps. But even a quantity of more than 1000 images is still no reason to perform such a directory nesting. For which Memory is finally also decided, it is important that the upload directory of the web server is writable, which for most WP users means the following:

The upload directory must be created with an FTP program and the directory rights must be set to "777". People who run a server themselves can also change the user rights to the user under which the server is operated and only grant the complete directory rights to this user.

Image names from the perspective of search engine optimization

Google and Co. consider a not too deep nesting to be more optimal, which is why it is also recommended to do without the monthly based folders. An image that is only found in the third or even fourth level of the directory is not considered as important as an image that is already accessible in the first level of the directory. Since via the image search option of the search engines or also via the images, the be displayed directly on the search results pageIf you want to improve the ranking of your website, not only the actual image name and the corresponding alt-attribute, but also the depth of the directory and the folder name is an essential factor for an improved ranking. For photo blogs, for example, it is advisable to store the images in the main directory of WordPress below /images or /fotos.

Current articles