Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Copa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Guía para principiantes sobre la estructura de archivos y directorios de WordPress

Nota editorial: Ganamos una comisión de los enlaces de socios en WPBeginner. Las comisiones no afectan a las opiniones o evaluaciones de nuestros editores. Más información sobre Proceso editorial.

¿Quieres aprender acerca de los archivos de WordPress y la estructura de directorios?

Todos los archivos del núcleo de WordPress, temas, plugins y subidas de usuarios se almacenan en el servidor de alojamiento de su sitio web.

En esta guía para principiantes, explicaremos la estructura de archivos y directorios de WordPress.

WordPress file and directory structure explained for beginners

¿Por qué debería aprender acerca de la estructura de archivos y directorios de WordPress?

La mayoría de los usuarios pueden ejecutar su sitio web WordPress sin tener que aprender acerca de los archivos o directorios de WordPress. Sin embargo, entender cómo WordPress almacena archivos y directorios puede ayudarle a resolver muchos problemas comunes de WordPress por su cuenta.

Esta guía le ayudará:

  • Aprende qué archivos y carpetas de WordPress son archivos del núcleo.
  • Entender cómo WordPress almacena tus imágenes y subidas de medios.
  • Dónde almacena WordPress sus temas y plugins.
  • Dónde se almacenan los archivos de configuración en su instalación de WordPress.

Esta información también le ayudará a saber cómo funciona WordPress entre bastidores y qué archivos de WordPress debe copiar.

Dicho esto, echemos un vistazo a la estructura de archivos y directorios de WordPress.

Acceso a los archivos y directorios de WordPress

Sus archivos y directorios de WordPress se almacenan en su servidor de alojamiento web. Puede acceder a estos archivos utilizando un cliente FTP. Consulte nuestra guía sobre cómo utilizar FTP para subir archivos de WordPress para obtener instrucciones detalladas.

Una alternativa más sencilla al FTP es la aplicación de gestión de archivos que viene integrada en la mayoría de los paneles de control de alojamiento de WordPress.

File manager app in hosting control panel

Una vez que se haya conectado a su sitio de WordPress mediante FTP o el Administrador de archivos, verá una estructura de archivos y directorios con el siguiente aspecto:

WordPress files and folders

Dentro de la carpeta raíz, verá los archivos y carpetas del núcleo de WordPress. Estos son los archivos y carpetas que ejecutan su sitio de WordPress.

Aparte de los archivos .htaccess y wp-config.php, no debe editar otros archivos por su cuenta.

Aquí tiene un listado de los archivos y carpetas del núcleo de WordPress que verá en el directorio raíz de su sitio WordPress.

  • wp-admin [dir]
  • wp-contenido [dir]
  • wp-includes [dir]
  • index.php
  • licencia.txt
  • readme.html
  • wp-activate.php
  • wp-blog- cabecera.php
  • wp-comments-post.php
  • wp-config-sample.php
  • wp-cron.php
  • wp-links-opml.php
  • wp-load.php
  • wp-login.php
  • wp-mail.php
  • wp-settings.php
  • wp-signup.php
  • wp-trackback.php
  • xmlrpc.php

En el anuncio / catálogo / ficha faltan los archivos .htaccess y wp-config.php. Eso es porque esos dos archivos se crean después de la instalación de WordPress.

Archivos de configuración de WordPress

Su directorio raíz de WordPress contiene algunos archivos de configuración especiales. Estos archivos contienen importantes ajustes específicos para su sitio WordPress.

WordPress configuration files
  • .htaccess – Un archivo de configuración del servidor, WordPress lo utiliza para gestionar los enlaces permanentes y las redirecciones.
  • wp-config. php – Este archivo le dice a WordPress cómo conectarse a su base de datos. También establece algunos ajustes globales para su sitio WordPress.
  • index.php – El archivo index básicamente carga e inicializa todos sus archivos de WordPress cuando una página es solicitada por un usuario.

Es posible que a veces tenga que editar el archivo wp-config.php o .htaccess. Tenga mucho cuidado al editar estos dos archivos. Un pequeño error puede hacer que su sitio sea inaccesible. Cuando edite estos dos archivos, cree siempre copias de seguridad en su ordenador antes de realizar cualquier cambio.

Si no ve el archivo .htaccess en el directorio raíz, finalice la compra / pago de nuestra guía sobre por qué no puede encontrar el archivo .htaccess en el directorio raíz de WordPress.

Dependiendo de cómo esté configurado su sitio WordPress, puede que tenga o no los siguientes archivos en su directorio raíz.

  • robots.txt – contiene instrucciones para los rastreadores de los motores de búsqueda
  • Favicon.ico – A veces los alojamientos de WordPress generan un archivo favicon.

Dentro de la carpeta wp-content

WordPress almacena todas las subidas, plugins y temas en la carpeta wp-content.

WordPress content folder

Generalmente se asume que se pueden editar archivos y carpetas dentro de la carpeta wp-content. Sin embargo, esto no es del todo cierto.

Echemos un vistazo a la carpeta wp-content para entender cómo funciona y qué puede hacer aquí.

Inside wp-content folder

El contenido de la carpeta wp-content puede variar de un sitio WordPress a otro. Pero todos los sitios de WordPress suelen tenerlos:

  • [dir] temas
  • [dir] plugins
  • [dir] subidas
  • index.php

WordPress almacena los archivos de su tema en la carpeta /wp-content/themes/. Puede editar un archivo de tema, pero generalmente no se recomienda. En cuanto actualice su tema a una versión más reciente, sus cambios se sobrescribirán durante la actualización.

Por eso se recomienda crear un tema hijo para personalizar el tema de WordPress.

Todos los plugins de WordPress que descargue e instale en su sitio se almacenan en la carpeta /wp-content/plugins/. No debes editar los archivos de los plugins directamente, a menos que hayas escrito un plugin de WordPress específico para tu sitio para tu propio uso.

En muchos tutoriales de WordPress, verás fragmentos de código que puedes añadir a tu sitio de WordPress. Puedes añadir código personalizado a tu sitio de WordPress añadiéndolo al archivo functions.php de tu tema hijo o creando un plugin específico para el sitio.

Pero, la forma más fácil y segura de añadir código personalizado es usando un plugin de fragmentos de código como WPCode. Para obtener instrucciones paso a paso, consulte esta guía sobre cómo añadir fácilmente código personalizado en WordPress.

WordPress almacena todas las subidas de imágenes y medios en la carpeta /wp-content/uploads/. Por defecto, las subidas se organizan en las carpetas /year/month/ . Siempre que cree una copia de seguridad de WordPress, debe incluir la carpeta uploads.

Puedes descargar copias actualizadas del núcleo de WordPress, tu tema y los plugins instalados desde sus fuentes. Pero si pierdes tu carpeta de subidas, será muy difícil restaurarla sin una copia de seguridad.

Algunas otras carpetas por defecto que puede ver en su directorio wp-content.

Muchos plugins de WordPress también pueden crear sus propias carpetas dentro de su carpeta wp-content para almacenar archivos.

Algunos plugins de WordPress pueden crear carpetas dentro de la carpeta /wp-content/uploads/ para guardar las subidas de los usuarios. Por ejemplo, este sitio web de demostración tiene carpetas creadas por los plugins Smash Balloon, WooCommerce, SeedProd y WPForms.

Plugins may create their own folders inside uploads directory

Algunas de estas carpetas pueden contener archivos importantes. Por eso recomendamos hacer una copia de seguridad de todas esas carpetas como medida de precaución.

Otras carpetas pueden contener archivos que puede borrar con seguridad. Por ejemplo tus plugins de caché como WPRocket pueden crear carpetas para guardar datos de caché.

Eso es todo, esperamos que este artículo te haya ayudado a entender la estructura de archivos y directorios de WordPress. Puede que también quieras ver nuestra guía para principiantes sobre la gestión de bases de datos de WordPress con phpMyAdmin, y nuestro tutorial sobre cómo crear un tema de WordPress personalizado sin ningún conocimiento de código.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Descargo: Nuestro contenido está apoyado por los lectores. Esto significa que si hace clic en algunos de nuestros enlaces, podemos ganar una comisión. Vea cómo se financia WPBeginner , por qué es importante, y cómo puede apoyarnos. Aquí está nuestro proceso editorial .

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

El último kit de herramientas de WordPress

Obtenga acceso GRATUITO a nuestro kit de herramientas - una colección de productos y recursos relacionados con WordPress que todo profesional debería tener!

Reader Interactions

57 comentariosDeja una respuesta

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Moinuddin Waheed says

    I have always fantasized about what goes behind the scene to run such a good wordpres front end and backend interface.
    This guide has cleared all those behind the scene aspect of wordpress working.
    Having a knowledge of these files and directories structure gives us command over tweaks that we can make.
    Thanks wpbeginner for this guide on wordpress file structure.

    • WPBeginner Support says

      It is almost the same, a multisite install would have folders for each of the subsites.

      Administrador

  3. Amit Maheshwari says

    Please help me on how can I create a folder inside my blog hoste on wordpress on my site. I want to create more subfolder under that like news, life etc to make sure my users get the content more organized?

  4. Kosovi says

    Getting this error: Fatal error: Call to undefined function wp() in XXXX\html\wp-blog-header.php on line 12. Tried several troubleshooting, but wont solve the issue. Stoped Theme, and pluggins.

  5. Bruno rasmussen says

    Hi
    Im getting the error message about a missing ads.txt file, i know where to find it, but im not sure where i have to insert it.

    Best regards
    Bruno
    Denmark

  6. J.Hameed says

    Am trying to upload an unzipped file to this location:

    wp-content/uploads/GeoLite2-Country.mmdb

    Question : How do I find the location and how do i upload the unzipped file to this location.

  7. John says

    Hi
    My website was hacked. it keeps redirecting me to a spammy site. I can’t log in via the backend (cos it keeps redirecting me to a spammy site) and I don’t have a backup of the site but I can still access my Cpanel but dont know what to do there, please any help will be appreciated.
    hemjaypost.com is the site

  8. Karen says

    Crazy question.
    After importing demo site content on an Avada themed site – there are so many pages I have NO IDEA how to get back to identify and edit my home page in the PAGES link? I now have 8 pages of “pages”. How can I find my Home page? BTW – In READINGS > SETTINGS – I’ve checked blog assigned to home page NOT to a STATIC Page. Many thanks!
    I have googled several ways – but can’t figure out this thing!

    • WPBeginner Support says

      Hi Karen,

      When you go to Pages » All Pages you should be able to see — Homepage label next to the page used as your homepage. You can also try reaching out to the theme developer for support.

      Administrador

  9. Mary Emerson says

    I, too, want to find where my old .htm files that are now encased in WordPress with different urls! I need to delete a bad xml file and I have to idea how to go to server and remove. I removed it permanently inside the page list, but I am afraid Bing is still thinking that is what I want submitted. It keeps saying it is not valid and I want to clear it out!
    Thank you!

  10. Lalit Kumar Yadav says

    hi
    i developed an custom post in woocommerce website. But after that i want to use an dynamic photo slider in this custom post, i tried a lot but failed to make it dynamic.please guide me about the use of page template and how to make slider dynamic.

  11. Ajju says

    Helpfull but i want edit a page outside without WordPress , by another html editer ,becouse i try to remove theme on some specific pages ,but not entier website

  12. JohnLeyo says

    thank you, that was very helpful… but i want to know if it is safe to replace all the wordpress core files by a new files?

  13. Ben says

    Hi there, I recently downloaded my old WordPress site onto my computer, and installed a new site on my domain. I am now trying to dig around and find all my blog posts from the old site so I can add them to the new site, any idea if thats possible and where I would find those? Thanks so much for your help.

  14. Hany Danial says

    what is the file name for the users in the wordpress? I have a complete backup for my site, moved it to another server, the number of the users were about 24K but now I found only 9K and I would like to restore the old one. Thanks in advance for your reply. Hany Danial

  15. Amit says

    Hi,

    Suppose if I want to change the look of the WordPress theme then which files are important or in which file do I need to change the code?

    Since last 2 years I am thinking to change the some little look of my theme but because of not fully understanding I couldn’t do it.

    Thanks,
    Amit

  16. tushar says

    Hi, thank you for this post I agree with you that An easier alternative to FTP is File Manager. It is a web-based application that comes built into cPanel dashboard of your WordPress hosting account. very useful information

  17. john says

    how to i change upload the pictures for the web site or upload the new coupon for the website that use WordPress or edit the content of the website?

    when I login to the FTP site, i see these 3 folders
    wp-admin
    wp-content
    wp-includes

    thanks
    john

      • john says

        thanks. the company who wrote the website did not transition to me. How do I request to reset the password to login to the admin page?

        also, i need to update just the coupons by update the new images of the coupons.

        also, how to i transfer the page_id=369 to the coupons page

        thanks again,
        John

  18. Ezeudo Emmanuel says

    great article. But I have a question though. I am a beginner and trying to design a website via wordpress. i have finished the design to an extent. but my problem is that when i try to upload my wordpress file via ftp (file zilla), i cant seem to find the file on my C:/. how to i locate my wordpress file? thank you as i await your response

  19. KAIZER MD AMIN says

    It is really helpful for me as I am just starting out with my blog and I have very little knowledge about these technical issues. Great content, thanks.

  20. fassaha says

    Great article! I do have a question though: Where do we actually find the articles that we wrote on the site? Let say I write an article on my site. This article is normally stored in wordpress files. where can I find it?
    Thanks

    • Henric Åkesson says

      Your article itself will not be stored in files, it will be stored in the database. Only your files will be stored inside the wp-content/uploads.

      Ok? :)

  21. ademola says

    please i need your help urgently, i want to restart my afresh. But i just need my articles and its images. i do not need anything else.The reason for this is that my hosting is saying someone is using my site to spam people using a business address i did not even add to my webmail. if i delete it they create another one. but now another issue is thta malware are been detected on the site. but i am using the newspaper theme so i do not know why all this issues. I can do all the installing of new wordpress and every other thing but i need to just put the contents i have on the new site i am going to create. i still have my old site on now and i have the backup in my file manager home directory.

  22. mimo says

    Thanks for the article….what about finding “pages” on the directory? i cant seem to find them…will they be accessible via cpanel or just in the wp interface? i see all the image files i uploaded on the [dir]uploads page, organized by month/year as you mentioned on the cpanel directory, but was wondering where i can find the actual Pages file/word content pages? thank you…

      • Buck Riley says

        So, there’s no way to get the contents of the page themselves through the FTP? Like, if I wanted to pull my about page from the FTP, I wouldn’t be able to do that?

        • Buck Riley says

          Or… is this databased stored elsewhere on the site outside of the wordpress folder, and having only backed up the wordpress folder when my site was deleted, I’ve lost all of my content?

        • WPBeginner Support says

          No, you will not be able to do that.

          WordPress does not create and store static pages. Instead, it stores your content in a database and then generates HTML pages on the fly.

        • Robert says

          “No, you will not be able to do that.

          WordPress does not create and store static pages. Instead,
          it stores your content in a database and then generates
          HTML pages on the fly.”

          After a WSOD and several hours of trying to get back to the dashboard, I deleted all WP files from my file mgr. Before I did that I backed up and stored all of those files in a temp file in file manager.

          Is there a way I can get my input (static pages) generated in html, so I may copy them?

          I am about ready to install another WP theme, but before I do so I hold a slim hope that these pages are still stored somewhere, like in an etheral world of some database.

        • Josh says

          Robert, I second your motion. The answer has been rather expertly skirted around here. Is there some kind of membership fee we need to pay for these kind of seemingly simple answers? All I can find is the import/export tool for the pages, then edit the CSS or delete the unnecessary pages as desired.

  23. Hemang Rindani says

    Nice article. For development team working with enterprise content management services like WordPress (or in that matter any other CMS like Sitefinity, Drupal, etc.) must understand the basic file structure. This will not only help them find the files but with this they will also be able to organize the files in proper way.
    Using a nested approach to save your content and system files is a the best way to design a file structure.

  24. Rafique says

    Thank You so much. It was Really Helpful for me. I work in my University Webteam and have made a website for them :)

Deja tu comentario

Gracias por elegir dejar un comentario. Tenga en cuenta que todos los comentarios son moderados de acuerdo con nuestros política de comentarios, y su dirección de correo electrónico NO será publicada. Por favor, NO utilice palabras clave en el campo de nombre. Tengamos una conversación personal y significativa.