Dosthana.com Content blog , Categories Marketing Content Experiences Sales Tech Agencies News Meet Dosthana.com Content Products & Services About Us Contact Us Free Resources Webinars and Events Jam Sessions Ebooks, Tools & more What are Content Experiences? Talk to an expert English Português Español , Dosthana.com Content blog search icon , ENEnglishPortuguêsEspañol , Subscribe , A basic guide to WordPress file and directory structure , Learn the particulars related to the WordPress file and directory structure, how to access your folders and the various ways you can fix errors with this feature. , Dosthana.com Content Writer Content writer Oct 29, 20 | 9 min read , , , Your WordPress file and directory structure is essential to getting your website working. Just as your computer needs the right files in the correct places for your programs and features to perform, your site requires the right structure to work as intended. However, are you familiar with how this structure is supposed to be organized and how to use it effectively? WordPress is the most popular content management system in the world. It is responsible for powering 34% of all websites on the web while also having a 61% share among CMS solutions. As it provides a lot of value to those who wish to use their websites to generate effective results, it is also important to learn how it works. Much of that depends on the correct file and directory structure. Your WordPress website or blog will only work correctly if all the right files are inside the appropriate folders, in the proper order. Keen to learn more about this? Here is everything you will see in this article: Understanding the WordPress file and directory structure;Accessing WordPress files and directories;4 WordPress errors and problems solved with FTP access;Changing your WordPress file and directory structure. Understanding the WordPress file and directory structure Just as the files on your computer make sure that all of its programs work correctly, the contents of your WordPress directory structure are vital to your website. A single missing file or a wrong attribute can take your entire site down and cause all kinds of problems for your WordPress installation. At the same time, knowing how to navigate the file and directory structure on your WordPress site can also help you fix several issues that might emerge. For instance, a buggy plugin can lock you out of your admin panel, with the only solution being to delete it from the file system directly. This is also essential knowledge for creating a theme in WordPress. That is why you must understand how the WordPress file and directory structure work. Learning how to navigate it will allow you to have more control over elements such as WordPress plugins and themes. In case any of these or perhaps even your WordPress installation itself go through issues, you can effectively fix them. A typical WordPress file and directory structure looks like this: Folders wp-admin This folder is responsible for powering your WordPress site’s admin tools, such as your dashboard and several key features like enabling connection to your database and managing user permissions. wp-content The wp-content folder has two subdirectories: plugins and themes, which store data related to these add-ons on your WordPress installation. Each plugin and theme you install will create a new folder in this structure. wp-includes Within the wp-includes folder are all the files necessary to make your website run, such as WordPress functions, those that control your posts, pages, widgets and the other various features. Files: index.phplicense.txtreadme.htmlwp-activate.phpwp-blog-header.phpwp-comments-post.phpwp-config-sample.phpwp-cron.phpwp-links-opml.phpwp-load.phpwp-login.phpwp-mail.phpwp-settings.phpwp-signup.phpwp-trackback.phpxmlrpc.php.htaccesswp-config.php It is recommended to keep the file and directory structure as it is when downloading WordPress from the official website. The zip file already contains all folders and files in the right places, so you just have to extract them all and upload them to your hosting service through FTP. Accessing WordPress files and directories You can easily browse and edit your files and folders within your WordPress installation through FTP access. This is an essential feature offered by the hosting service and can usually be found at the user panel or control center, depending on how your interface is organized. If you are in doubt, consult tech support. FTP access requires entry via a login and password. You also have to specify the correct connection port. This allows you to add files from your computer to your site, or download files from the site locally. You can do that in two ways: a web app offered by your hosting service, which you can usually find in your admin panel;a third-party program such as FileZilla or WinSCP, which are recommended for heavier file operations. A FTP directory functions just like the ones you have on your computer. They can be renamed, moved, deleted, and created as well as store all kinds of files. Be careful not to inadvertently edit or erase important WordPress installation files as they are required to keep your website online. 4 WordPress errors and problems solved with FTP access Having FTP access to your file and directory structure allows you to fix several common errors and problems within WordPress. Knowing how to open your directories can help you regain access to your WordPress site or blog, configure its permissions settings and even enable maintenance protocols. Below, you will see a list of 4 common WordPress errors and problems that can be fixed with the use of FTP access: 1. Fix database connection errors in WordPress If you get an Error Establishing a Database Connection in WordPress, the first step you should take is to try to enter your admin panel. In case that shows you ‘an unavailable database error’, then you need to repair that connection. This task can be performed easily through FTP access. Go to your root WordPress folder and edit the wp-config.php file. Add the following line to the end of the file: define(‘WP_ALLOW_REPAIR’, true); After saving and reuploading the wp-config.php file, visit the following URL on your browser: www.yoursite.com/wp-admin/maint/repair.php This will open a maintenance utility from WordPress that allows you to repair your databases. Just click the button to begin the process. When you are done, do not forget to edit the wp-config.php file again to remove the line you added. 2. Fix the WordPress Memory Exhausted Error In case your WordPress website or blog is showing a Memory Exhausted Error, this can be fixed with FTP access and some knowledge of how to change the allowed memory usage for your pages and plugins. The default memory allocation for WordPress is 64 MB, which is usually enough for most cases. However, there might be situations where you need more. All of your site’s WordPress functions rely on memory to perform their tasks just like a computer. Also, just like a desktop needs appropriate RAM to run its applications, you need to allocate enough memory for your WordPress site. To do that, first access your website’s FTP directory and open your WordPress root folder. There, you will need to edit the wp-config.php file. At the last line, paste the following text: define( ‘WP_MEMORY_LIMIT’, ‘256M’ ); This will set your allocated memory limit to 256 MB, which should be more than enough for the Memory
A basic guide to WordPress file and directory structure

