Te ayudamos a gestionar tu negocio

En este articulo final de como asegurar nuestro sitio de WordPress damos los últimos retoques a nuestros principales ficheros de la instalación.

Proteger el fichero wp-config

El archivo wp-config .php es uno de los archivos más importantes de tu WordPress en él tienes los datos de conexión a tu base de datos, obviamente no quieres que nadie pueda ver ese archivo, para ello solo debes agregar el siguiente código:

<files wp-config .php>
order allow,deny
deny from all
</files>

Esto bloquea el acceso a cualquier persona desde el navegador.

Proteger el acceso al escritorio

Escritorio con conexión segura (SSL)

Aunque siempre es mejor proteger todo el sitio con el candado verde, si no fuera posible, al menos configura el escritorio (/wp-admin) para que las conexiones estén cifradas.

Hay que tener en cuenta que para poder usar el certificado de seguridad —SSL— antes debe estar instalado en el alojamiento. El método de instalarlo depende del proveedor de alojamiento. 

Proteger los ficheros

Comprueba los permisos de los ficheros

Unos permisos de ficheros inadecuados son un riesgo de seguridad importante.

Los permisos de los ficheros se pueden revisar y cambiar usando Filezilla, Cyberduck o cualquier cliente FTP.

Todos los ficheros deben pertenecer a tu usuario —normalmente el usuario con el que te conectas por FTP— y tendrán los permisos 755 para los directorios y 644 para los ficheros. Significa que otorgas permiso completo a tu usuario y permiso de solo lectura al resto.

Elimina ficheros innecesarios

La instalación de WordPress deja algunos ficheros innecesarios de los que un atacante puede extraer información valiosa para realizar posteriormente un ataque.

Borra los ficheros readme.html y license.txt que muestran la versión de WordPress instalada en el sitio y el fichero wp-admin/install.php que es un resto de la instalación y sirve para reinstalar el sitio.

Restringir el listado de directorios

Es habitual que el proveedor del alojamiento haya desactivado el listado de directorios. Aún así, conviene reforzar la protección añadiendo esta línea al fichero .htaccess en la raíz (carpeta public_html/) del sitio:

# public_html/.htaccess
Options All -Indexes

Asegurar la base de datos

Cambia el prefijo de la base de datos

Como WordPress es un sistema abierto y conocido, es posible conocer de antemano el nombre de las tablas de la base de datos. Así, sabemos que las tablas más importantes son: wp_users o wp_options. Del mismo modo, un atacante también conoce la estructura de la base de datos y utiliza esta información para hacer modificaciones usando plugins vulnerables a ataques de inyección SQL.

Una técnica para dificultar los ataques de inyección SQL consiste en cambiar el prefijo de las tablas de la base datos. En lugar de usar el prefijo wp_ genera uno aleatorio y único para el sitio, por ejemplo ej3mpl0_.

Puedes cambiar el prefijo durante la instalación de WordPress o usar el plugin Change Table Prefix para un sitio que ya esta instalado.

También se puede bloquear el acceso a la base de datos de tu hosting bloqueando el acceso interno a localhost. Esto se realiza desde el panel de control de tu empresa de hosting.

Un buen fichero robots.txt 

Google o Bing guardan mucha información de tu sitio web que utilizan para sus buscadores. El problema viene cuando un atacante utiliza el buscador para encontrar agujeros de seguridad en tu sitio. Estas técnicas se llaman Google Dorks.

Para proteger los sitios web surge el fichero robots.txt que sirve para dar instrucciones a Google sobre que debe y que no debe indexar. WordPress no tiene un fichero robots.txt por defecto por eso es importante crear uno a medida de las necesidades de tu sitio. Este es un ejemplo de un fichero Robots.txt localizado por internet.

Sitemap: http://tusitio/sitemap.xml 
User-Agent: *
Allow: /wp-content/uploads/
Allow: /feed/$
Disallow: /wp-
Disallow: /wp-content/
Disallow: /trackback/
Disallow: /wp-admin/
Disallow: /feed/
Disallow: /?s=
Disallow: /search
Disallow: /archives/
Disallow: /index.php
Disallow: /*?
Disallow: /*.php$
Disallow: /*.js$
Disallow: /*.inc$
Disallow: /*.css$
Disallow: */feed/
Disallow: */trackback/
Disallow: /page/
Disallow: /tag/
Disallow: /category/

# No indexar copias de seguridad
Disallow: /*.sql$
Disallow: /*.tgz$
Disallow: /*.gz$
Disallow: /*.tar$
Disallow: /*.svn$

# Reglas para bots conocidos

User-agent: Googlebot

User-agent: Googlebot-Image
Disallow: /wp-includes/
Allow: /wp-content/uploads/

User-agent: Mediapartners-Google*
Disallow:

User-agent: ia_archiver
Disallow: /

User-agent: duggmirror
Disallow: /

User-agent: noxtrumbot
Crawl-delay: 50

User-agent: msnbot
Crawl-delay: 30

User-agent: Slurp
Crawl-delay: 10

User-agent: MSIECrawler
Disallow: /

User-agent: WebCopier
Disallow: /

User-agent: HTTrack
Disallow: /

User-agent: Microsoft.URL.Control
Disallow: /

User-agent: libwww
Disallow: / 

La primera linea Sitemap: http://tusitio.org/sitemap.xml es el fichero que sirve para ubicar el rastreo que hace google en el sitio.

Pero recuerda realizar copias de seguridad diarias de tu sitio web, ya que hay veces que es el ultimo recurso ante una perdida de datos o un hackeo

Compartenos en sus Redes Sociales

24 comentarios en «Asegurar WordPress año 2020 – Part 3 –»

  1. As somebody who’s always been cautious regarding my blood sugar level, locating Sugar Defender has been a relief.

    I really feel a lot extra in control, and my recent
    check-ups have revealed favorable improvements. Knowing I have a trusted supplement
    to sustain my regular offers me comfort. I’m so grateful for Sugar Defender’s influence on my health!

  2. As someone who’s constantly bewared concerning my blood glucose, locating Sugar Protector has actually been a relief.
    I really feel a lot more in control, and my current
    exams have revealed favorable enhancements. Knowing I have a
    trustworthy supplement to sustain my regular provides me satisfaction. I’m so thankful for Sugar
    Defender’s influence on my health!

  3. Incorporating Sugar Defender right into my day-to-day routine general health.
    As someone that prioritizes healthy eating, I value the added defense this
    supplement gives. Given that starting to take it, I have actually discovered a marked enhancement in my
    power degrees and a substantial reduction in my desire for
    undesirable snacks such a such a profound influence on my day-to-day live.

  4. Howdy! Do you know if they make any plugins to help with SEO?
    I’m trying to get my website to rank for some targeted keywords but I’m not seeing very good gains.
    If you know of any please share. Cheers! I saw similar blog here: Warm blankets

  5. sugar defender Adding Sugar Defender to my day-to-day
    routine was one of the very best decisions I have actually created my health and wellness.
    I take care about what I eat, yet this supplement includes an additional layer of assistance.
    I feel more stable throughout the day, and my food cravings have actually lowered substantially.
    It behaves to have something so easy that makes such a big distinction!

  6. The right training builds safe, confident drivers—join our Brisbane driving
    school today!
    Ready to take the next step? Book your first lesson today
    and start your driving journey! Don’t risk bad habits—learn the correct techniques from the very beginning.

  7. Our comprehensive driving lessons cover everything from basic controls to complex manoeuvres.

    Choosing a reputable driving school is crucial—our instructors are highly experienced and qualified.
    Your safety is our top priority—learn from the best!

  8. Our friendly, patient instructors make learning to drive
    stress-free and enjoyable.
    Learning to drive should be exciting, not overwhelming.
    Our patient instructors guide you every step of the
    way. Safe driving habits start from day one—book your first
    lesson with us today!

  9. Want to pass your test on the first try? Our Brisbane driving school has
    a proven success rate!
    Our instructors are trained to work with nervous drivers, making learning stress-free.
    Practice makes perfect, and our structured lessons ensure you get plenty
    of it!

  10. Our goal is to help you pass your test AND become a safe, confident driver for life.

    Getting your P-plates is easier with the right training—our students pass with confidence.

    A confident driver is a safe driver—our lessons build both confidence and
    skill.

  11. Our driving lessons in Brisbane are designed to be fun, informative, and
    stress-free.
    Choosing a reputable driving school is crucial—our instructors are highly experienced and
    qualified. Choosing a reputable driving school
    is crucial—our instructors are highly experienced and qualified.

  12. With Brisbane’s changing traffic conditions, proper training is essential for
    every new driver.
    Roundabouts can be tricky, but our expert instructors make
    sure you get it right every time. Ready to
    take the next step? Book your first lesson today and start your driving journey!

  13. Don’t leave it too late—book your lessons now to get test-ready
    in time.
    Want to master highway driving? Our lessons ensure you’re
    comfortable at higher speeds. Your first driving lesson should be a positive
    experience—our friendly team ensures it is!

  14. Learning to drive with us means gaining real-world skills you’ll use for life.

    A structured approach to learning ensures long-term success—book
    with us today! We cater to learners of all ages—whether
    you’re 16 or 60, we’ll help you get your licence.

  15. Driving in Brisbane means handling various road conditions—our lessons prepare you for them all.

    The sooner you start learning, the sooner you gain independence on the road!
    Learners often worry about stalling in traffic—we’ll teach you how to avoid it.

Deja un comentario

Le Puede Interesar...
Bases de datos
Formación
admin

ABD

– Formación – Administración de sistemas gestores de bases de datos ( abr ) Lunasoft Consultoria Informática dejanos a nosotros estas en buenas manos Un

Leer Más >>
Sai Trifasico en CPD
Equipos
admin

Sai Online, Interactivo y Offline

– Hardware – SAIS Online-Offline-Interactivo  ¿Qué es un SAI? Un SAI es un Sistema de Alimentación Ininterrumpida, estos aparatos de protección contra problemas eléctricos y

Leer Más >>

Da el primer paso nosotros hacemos el resto

Además somos especialistas en las nueva tecnologías,Tiendas Online, certificados web, Dominios, Software de Grabación, video vigilancia, Formación…

Estamos aquí para ayudarle, nuestra experiencia a lo largo de los años nos hace un equipo competitivo y Profesional de todas las necesidades para los particulares y las Pymes.

Ultimas Noticias

Bases de datos

ABD

– Formación – Administración de sistemas gestores de bases de datos ( abr ) Lunasoft Consultoria Informática dejanos a nosotros estas en buenas manos Un

Leer Más >>
Sai Trifasico en CPD

Sai Online, Interactivo y Offline

– Hardware – SAIS Online-Offline-Interactivo  ¿Qué es un SAI? Un SAI es un Sistema de Alimentación Ininterrumpida, estos aparatos de protección contra problemas eléctricos y

Leer Más >>
Boton de Compra Segura en Lunasoft

Estamos aquí para ayudarte

contactanos hoy

© 2020 All Rights Reserved