Está querendo mudar o WordPress de HTTP para HTTPS e instalar um certificado SSL em seu site?
Recebemos muitas solicitações sobre esse tópico porque o Google anunciou em julho de 2018 que o navegador Chrome marcará todos os sites sem SSL como inseguros.
Neste artigo, mostraremos como mover corretamente o WordPress de HTTP para HTTPs adicionando um certificado SSL.
![Moving WordPress from HTTP to HTTPS / SSL Moving WordPress from HTTP to HTTPS / SSL](https://www.wpbeginner.com/wp-content/uploads/2018/07/httptohttpsguide.png)
Não se preocupe se você não tem ideia do que é SSL ou HTTPS. Nós também explicaremos isso.
O que é HTTPS?
HTTPS ou HTTP seguro é um método de criptografia que protege a conexão entre o navegador dos usuários e o seu servidor. Isso torna mais difícil para os hackers espionarem a conexão.
Todos os dias, compartilhamos nossas informações pessoais com diferentes sites, seja para fazer uma compra ou simplesmente para fazer login.
Para proteger a transferência de dados, é necessário criar uma conexão segura.
É aí que entram em cena o SSL e o HTTPS.
Cada site recebe um certificado SSL exclusivo para fins de identificação. Se um servidor estiver fingindo estar em HTTPS e seu certificado não corresponder, a maioria dos navegadores modernos advertirá o usuário para que não se conecte ao site.
![Connection not private error in Google Chrome Connection not private error in Google Chrome](https://www.wpbeginner.com/wp-content/uploads/2018/07/connection-not-private-1.png)
Agora, você deve estar se perguntando por que preciso mudar meu site WordPress de HTTP para HTTPS, especialmente se for um blog simples ou um site de uma pequena empresa que não recebe pagamentos.
Por que você precisa de HTTPS e SSL?
Em 2018, o Google anunciou um plano para melhorar a segurança geral da Web, incentivando os proprietários de sites a mudar de HTTP para HTTPS. Como parte desse plano, seu popular navegador Chrome marcaria todos os sites sem um certificado SSL como “Não seguro”.
![Connection not secure Connection not secure](https://www.wpbeginner.com/wp-content/uploads/2018/07/notsecure-1.png)
O Google também disse que os sites com SSL também terão benefícios de SEO e obterão classificações de pesquisa mais altas do que os sites inseguros. Desde então, um grande número de sites mudou de HTTP para HTTPS.
Após o anúncio, o Google começou a implementar o aviso “Not Secure” no Chrome. Por exemplo, se alguém visitar um site HTTP usando a janela anônima, ele será marcado como Não seguro. Se alguém visitar um site HTTP no modo normal e tentar preencher um formulário de contato ou outro formulário, o site será marcado como inseguro.
Quando seus leitores e clientes veem esse aviso, eles têm uma má impressão de sua empresa.
É por isso que todos os sites precisam mudar de HTTP para HTTPS e instalar o SSL imediatamente.
Sem mencionar que, se você quiser aceitar pagamentos on-line no seu site de comércio eletrônico, precisará de SSL.
A maioria das empresas de pagamento, como Stripe, PayPal Pro, Authorize.net, etc., exigirá uma conexão segura antes de aceitar pagamentos.
Usamos SSL em nossos sites, incluindo WPBeginner, OptinMonster, WPForms e MonsterInsights.
Requisitos para usar HTTPS/SSL em um site WordPress
Os requisitos para usar o SSL no WordPress não são muito altos. Tudo o que você precisa fazer é comprar um certificado SSL, e talvez você já o tenha gratuitamente.
As melhores empresas de hospedagem WordPress estão oferecendo certificados SSL gratuitos para todos os seus usuários:
Para obter mais detalhes, consulte nosso guia sobre como obter um certificado SSL gratuito para seu site WordPress.
Se a sua empresa de hospedagem não oferecer um certificado SSL gratuito, você precisará comprar um certificado SSL.
Recomendamos usar o Domain.com porque ele oferece a melhor oferta de SSL para certificados SSL regulares e curinga.
Ao adquirir um certificado SSL deles, você também recebe um selo de site TrustLogo para o seu site, e cada certificado SSL vem com uma garantia de segurança mínima de US$ 10.000.
Depois de adquirir um certificado SSL, você precisará solicitar ao provedor de hospedagem que o instale para você.
Configuração do WordPress para usar SSL e HTTPs
Depois de ativar um certificado SSL em seu nome de domínio, você precisará configurar o WordPress para usar os protocolos SSL e HTTPs em seu site.
Mostraremos dois métodos para fazer isso, e você pode escolher o que melhor atende às suas necessidades.
Tutorial em vídeo
Se você preferir instruções por escrito, continue lendo
Método 1: Configurar SSL/HTTPS no WordPress usando um plug-in
Esse método é mais fácil e é recomendado para iniciantes.
Primeiro, você precisa instalar e ativar o plug-in Really Simple SSL. Para obter mais detalhes, consulte nosso guia passo a passo sobre como instalar um plug-in do WordPress.
Após a ativação, você precisa visitar a página Configurações ” SSL. O plug-in detectará automaticamente seu certificado SSL e configurará seu site WordPress para usar HTTPs.
![SSL enabled on a WordPress website SSL enabled on a WordPress website](https://www.wpbeginner.com/wp-content/uploads/2018/07/enablewpssl.png)
O plug-in cuidará de tudo, inclusive dos erros de conteúdo misto. Veja a seguir o que o plug-in faz nos bastidores:
- Verificar o certificado SSL
- Configure o WordPress para usar https em URLs
- Configurarredirecionamentos de HTTP para HTTPs
- Procure URLs em seu conteúdo que ainda estejam sendo carregados de fontes HTTP inseguras e tente corrigi-los.
Observação: o plug-in tenta corrigir erros de conteúdo misto usando a técnica de buffer de saída. Ele pode ter um impacto negativo no desempenho porque está substituindo o conteúdo do site enquanto a página está sendo carregada. Esse impacto é visto apenas no carregamento da primeira página e deve ser mínimo se você estiver usando um plug-in de cache.
Embora o plug-in diga que você pode manter o SSL e desativar o plug-in com segurança, isso não é 100% verdadeiro. Você terá que deixar o plug-in ativo o tempo todo, pois a desativação do plug-in trará de volta erros de conteúdo misto. Consulte nossa análise do Really Simple SSL para obter mais detalhes.
Método 2: Configurar SSL/HTTPS no WordPress manualmente
Esse método exige que você solucione os problemas manualmente e edite os arquivos do WordPress. No entanto, essa é uma solução permanente e mais otimizada em termos de desempenho. É o que estamos usando no WPBeginner.
Se você achar esse método difícil, poderá contratar um desenvolvedor do WordPress ou usar o primeiro método.
Como parte desse método, talvez seja necessário editar o tema e os arquivos de código do WordPress. Se você nunca fez isso antes, consulte nosso guia sobre como copiar e colar trechos de código no WordPress.
Primeiro, você precisa acessar a página Configurações ” Geral. A partir daí, você precisa atualizar os campos de endereço de URL do WordPress e do site, substituindo http por https.
![Update WordPress URLs Update WordPress URLs](https://www.wpbeginner.com/wp-content/uploads/2018/07/updatewpurls.png)
Não se esqueça de clicar no botão “Salvar alterações” para armazenar suas configurações.
Depois que as configurações forem salvas, o WordPress fará o logout e você será solicitado a refazer o login.
Em seguida, você precisa configurar os redirecionamentos do WordPress de HTTP para HTTPS adicionando o seguinte código ao seu arquivo .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
Se você estiver usando servidores NGINX, precisará adicionar o seguinte código para redirecionar de HTTP para HTTPS em seu arquivo de configuração:
server {
listen 80;
server_name example.com www.example.com;
return 301 https://example.com$request_uri;
}
Não se esqueça de substituir example.com por seu nome de domínio.
Seguindo essas etapas, você evitará o erro HTTPS not working do WordPress, pois o WordPress carregará todo o seu site usando https.
Se quiser forçar o SSL e o HTTPS na área de administração ou nas páginas de login do WordPress, você precisará configurar o SSL no arquivo wp-config.php.
Adicione o seguinte código acima da linha “That’s all, stop editing!” (Isso é tudo, pare de editar! ) em seu arquivo wp-config.php:
define('FORCE_SSL_ADMIN', true);
Essa linha permite que o WordPress force SSL / HTTPs na área de administração do WordPress. Ela também funciona em redes multisite do WordPress.
Depois de fazer isso, seu site estará totalmente configurado para usar SSL/HTTPS, mas você ainda encontrará erros de conteúdo misto.
Esses erros são causados por fontes (imagens, scripts ou folhas de estilo) que ainda estão sendo carregadas usando o protocolo HTTP inseguro nos URLs. Se esse for o caso, você não conseguirá ver o ícone de cadeado seguro na barra de endereços do seu site.
![Not secure Not secure](https://www.wpbeginner.com/wp-content/uploads/2018/07/notsecure.png)
Muitos navegadores modernos bloqueiam automaticamente scripts e recursos não seguros. Você poderá ver um ícone de cadeado, mas com uma notificação sobre isso na barra de endereços do navegador.
![Insecure content blocked Insecure content blocked](https://www.wpbeginner.com/wp-content/uploads/2018/07/insecurecontent.png)
Você pode descobrir qual conteúdo é servido por meio de um protocolo inseguro usando a ferramenta Inspect. O erro de conteúdo misto será exibido como um aviso no console com detalhes de cada item de conteúdo misto.
![Mixed content errors displayed in browser console Mixed content errors displayed in browser console](https://www.wpbeginner.com/wp-content/uploads/2018/07/mixedcontentconsole.png)
Você perceberá que a maioria dos URLs são imagens, iframes e galerias de imagens, enquanto alguns são scripts e folhas de estilo carregados pelos plug-ins e temas do WordPress.
Correção de conteúdo misto no banco de dados do WordPress
A maioria dos URLs incorretos será de imagens, arquivos, incorporações e outros dados armazenados no banco de dados do WordPress. Vamos corrigi-los primeiro.
Tudo o que você precisa fazer é localizar no banco de dados todas as menções ao URL do seu site antigo que começam com http e substituí-lo pelo URL do seu novo site que começa com https.
Você pode fazer isso facilmente instalando e ativando o plug-in Better Search Replace. Para obter mais detalhes, consulte nosso guia passo a passo sobre como instalar um plug-in do WordPress.
Após a ativação, você precisa acessar a página Tools ” Better Search Replace. No campo “Search” (Pesquisar), você precisa adicionar o URL do seu site com http
. Depois disso, adicione o URL do seu site com https no campo “Replace” (Substituir).
![Search and replace Search and replace](https://www.wpbeginner.com/wp-content/uploads/2018/07/searchreplace.png)
Abaixo disso, você verá todas as tabelas do banco de dados do WordPress. Você precisa selecionar todas elas para executar uma verificação completa.
Por fim, você precisa desmarcar a caixa ao lado da opção “Run as dry run?” e, em seguida, clicar no botão “Run Search/Replace”.
O plug-in agora pesquisará em seu banco de dados do WordPress os URLs que começam com http e os substituirá por URLs https seguros. Isso pode demorar um pouco, dependendo do tamanho do seu banco de dados do WordPress.
Correção de erros de conteúdo misto no tema do WordPress
Outro culpado comum que causa erros de conteúdo misto é o tema do WordPress. Qualquer tema decente do WordPress que siga os padrões de codificação do WordPress não causará esse problema.
Primeiro, você precisará usar a ferramenta Inspect do seu navegador para localizar os recursos e de onde eles estão sendo carregados.
![Using inspect tool to find mixed content error Using inspect tool to find mixed content error](https://www.wpbeginner.com/wp-content/uploads/2018/07/inspecttool2.png)
Depois disso, você precisará encontrá-los em seu tema do WordPress e substituí-los por https. Isso será um pouco difícil para a maioria dos iniciantes, pois você não conseguirá ver quais arquivos de tema contêm esses URLs.
Correção de erros de conteúdo misto causados por plug-ins
Alguns recursos de conteúdo misto serão carregados por plug-ins do WordPress. Qualquer plug-in do WordPress que siga os padrões de codificação do WordPress não causará erros de conteúdo misto.
Não recomendamos a edição de arquivos de plug-in do WordPress. Em vez disso, você precisa entrar em contato com o autor do plug-in e informá-lo. Se eles não responderem ou não puderem corrigir o problema, você precisará encontrar uma alternativa adequada.
Observação: se, por algum motivo, você ainda estiver encontrando o erro de conteúdo misto, recomendamos usar o plug-in Really Simple SSL temporariamente, para que seus usuários não sejam afetados enquanto você corrige o problema em um site de teste ou contrata um desenvolvedor.
Envie seu site HTTPS para o Google Search Console
Mecanismos de pesquisa como o Google consideram https e http como dois sites diferentes. Isso significa que você precisará informar ao Google que seu site foi transferido para evitar problemas de SEO.
Para fazer isso, basta acessar sua conta do Google Search Console e clicar no botão “Adicionar uma propriedade”.
![Add property Add property](https://www.wpbeginner.com/wp-content/uploads/2018/07/addproperty.png)
Isso abrirá uma janela pop-up na qual você precisará adicionar o novo endereço https do seu site.
Há dois métodos de verificação de site: nome de domínio ou prefixo de URL. Recomendamos o método do prefixo do URL porque ele é mais flexível.
![Add website URL in Google Search Console Add website URL in Google Search Console](https://www.wpbeginner.com/wp-content/uploads/2018/07/addwebsiteurl.png)
Depois disso, o Google solicitará que você verifique a propriedade do seu site.
Há várias maneiras de fazer isso. Selecione qualquer método e você receberá instruções para verificar seu site. Recomendamos usar o método de tag HTML.
![HTML tag method to verify your site HTML tag method to verify your site](https://www.wpbeginner.com/wp-content/uploads/2018/07/htmltagmethod.png)
Agora você verá um trecho de código HTML que precisa ser inserido na seção de cabeçalho do seu site WordPress.
Adicionar código de verificação do Search Console usando o All in One SEO
Primeiro, instale e ative o plug-in All in One SEO para WordPress. Para obter mais detalhes, consulte nosso tutorial sobre como instalar um plug-in do WordPress.
Observação: Há também uma versão gratuita do All in One SEO que você pode experimentar.
Após a ativação, vá para a página All in One SEO ” Configurações gerais e clique em Google Search Console.
![add-verification-code-aioseo Add Google Search Console verification code in All in One SEO](https://www.wpbeginner.com/wp-content/uploads/2018/07/add-verification-code-aioseo.png)
Em seguida, você precisa adicionar o código de verificação que copiou anteriormente do site do Google Search Console.
Não se esqueça de clicar no botão Save Changes (Salvar alterações) para armazenar suas configurações.
Em seguida, volte para a guia Google Search Console e clique no botão Verificar.
![Verify ownership Verify ownership](https://www.wpbeginner.com/wp-content/uploads/2018/07/verifyownership.png)
Depois que seu site for verificado, o Google mostrará os relatórios do console de pesquisa aqui.
Você também precisa garantir que as versões https e http sejam adicionadas ao Search Console.
Isso informa ao Google que você deseja que a versão https do seu site seja tratada como a versão principal. Combinado com os redirecionamentos 301 que você configurou anteriormente, o Google transferirá suas classificações de pesquisa para a versão https do seu site, e você provavelmente verá melhorias nas suas classificações de pesquisa.
Esperamos que este artigo tenha ajudado você a adicionar HTTPS e SSL no WordPress. Talvez você também queira ver nosso guia definitivo de segurança do WordPress com instruções passo a passo para manter seu site do WordPress seguro ou nossas escolhas de especialistas das melhores soluções de análise para WordPress.
Se você gostou deste artigo, inscreva-se em nosso canal do YouTube para receber tutoriais em vídeo sobre o WordPress. Você também pode nos encontrar no Twitter e no Facebook.
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!
Yasir says
Is this plugin is secured.
WPBeginner Support says
Yes, the plugin should currently be secured.
Administrador
ammar says
Hi, if i’m using the 1st method, do I need to follow the Submit my HTTPS Site to Google Search Console step also after that?
TQ
WPBeginner Support says
Yes, you would still want to follow that step
Administrador
Swen says
I installed the Really Simple SSL plugin, which states that you should manually replace every http:// in all .css and .js files to //. That doesn’t sound really simple to me. As a beginner I set up a simple website with a couple of pictures. Is it common that http:// statements are in these files?
WPBeginner Support says
Normally those links are not common so it shouldn’t be something to worry about.
Administrador
Lucas says
Hi,
When adding the code to .htaccess, i get a “too many redirects” error. I tryed adding to the existing code above, below, and also erasing the existing code and using only the new. All three option get too many redirects.
Is there something I should change there? Thanks in advance for your help!
WPBeginner Support says
You would want to try some of the suggestions in our article here:
https://www.wpbeginner.com/wp-tutorials/how-to-fix-error-too-many-redirects-issue-in-wordpress/
for resolving the too many redirects and should those recommendations not work, you would want to check with your hosting provider to ensure they do not have a system that needs to be modified to point to the https version of your site.
Administrador
Sotir Sotirov says
I’ve tried using the plugin but when I do the website becomes not accessible. I’ve tried the manual approach but once I’ve changed the addresses in WP settings the site becomes not accessible again.
WPBeginner Support says
You would want to reach out to your hosting provider to ensure that your SSL certificate is connected to your domain correctly and they should be able to help![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Mike Ashworth says
I am about to make the change to SSL and will be following the guidance in te article, initially using the really simple ssl plugin. Before i begin i have a quick question.
If I use the really simple ssl plugin, which takes care of everything, i can leave the general settings in wordpress for wordpress address and site address as http rather than change to https as the plugin will be taking care of it?
WPBeginner Support says
Correct![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Mike Ashworth says
Thanks for confirming. I have one other rquestion.
having just activated lets encrypt ssl on siteground for a website, i am asked wther i want to switch the following on or leave it off.
HTTPS Enforce – Forces your site to work entirely over an encrypted HTTPS connection. The redirect is performed on server level and works for any website.
Do i leave this off as the really simple ssl plugin will take care of this as well?
WPBeginner Support says
Yes, you can leave that off, you would only want to use that should there be any issues with the plugin or Google finding http links
Mike Ashworth says
Thanks for your advice. WP Beginner is such an awesome website. Keep up the great work!
stephan says
I want to thank you a lot. I have been looking for the errors over 12hours and get it done with better replace plugins. Thanks a lot dear.
WPBeginner Support says
Glad our recommendation could help you![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Arlina says
Does adding in the plugin of SSL slow down my blog speed performance?
WPBeginner Support says
It shouldn’t slow your site down
Administrador
Peter Wilson says
Can someone tell me, do I replace the contents on my.htaccess. file with the suggested code or do I place it and the beginning/end of the eisting entry.
WPBeginner Support says
You would add it at the end of the current code in your htaccess file.
Administrador
Peter Wilson says
Thanks for the quick reply. So, would that be after the existing and before the # END WordPress, or does it go after the .
WPBeginner Support says
That should not matter, it may be a good idea to do it after should you need to remove the code in the future![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Shivanandana says
Really awesome guide. Thank you so much! Thanks again for this detailed post!
WPBeginner Support says
Glad you like our content![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Håkan says
Great content, helped me alot!
WPBeginner Support says
Thank you, glad our content was helpful![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Harsha says
Very useful guide, thank you very much!
WPBeginner Support says
You’re welcome, glad our article was helpful![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Jan-Peter Molenaar says
Thanks a lot!! Valuable content![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
WPBeginner Support says
You’re welcome, glad our content is helpful![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Greg says
This article was so helpful. Thank you so much! Made it very easy.
WPBeginner Support says
You’re welcome, glad our article was helpful![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Nel says
Most helpful guide ever. Thank you for this.
WPBeginner Support says
You’re welcome![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Jessica Quadra says
This was so helpful and each step worked perfectly. Thank you!!
WPBeginner Support says
You’re welcome, glad our guide could help![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Hassen Loukil says
Hi!
Thanks for the article!
What about google analytics? Same thing as Google search console or not?
WPBeginner Support says
For Google Analytics you should be able to update to https under your property settings
Administrador
Arif Ahmed says
When I enable “WordPress 301 redirection to SSL” option from “Really Simple SSL Plugin” it works fine, but it removes query parameters. For example, when I get users from Adwords campaign it strips off gclid parameters.
Please guide
WPBeginner Support says
You would want to reach out to Really Simple SSL’s support to see if there is an option for query strings.
Administrador
Oswald Porter says
Thanks for your helpful article.
The manual SSL/HTTPS set up seems be be working for the main site.
However the mixed content error (images) still appears after using the Better Search Replace plug-in.
At Media Library, images appear with ‘https’, but not at the site’s each post
Indeed, at all posts, when I right-click on the post image > ‘Copy image address’, it shows:
http://
Ideas? Thanks in advance.
WPBeginner Support says
You would want to start by clearing any caching on your site and if that doesn’t work you could try the velvet blues plugin from our article: https://www.wpbeginner.com/plugins/how-to-update-urls-when-moving-your-wordpress-site/
Administrador
Kathy says
Hi,
I used this tutorial on many sites and it works like a charm. Thanks for that.
Do you know if I can also use it to update my multisite(s). Or are additional steps needed?
WPBeginner Support says
Depending on how your multisite is set up there are normally more steps involved. If you reach out to your hosting provider they can normally help
Administrador
Ralph says
Thanks, very nice tutorial.
WPBeginner Support says
Thanks, glad you liked our guide![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Oz says
Fantastic and straightforward!
What steps do we need to take to make sure our social share count (e.g., Facebook, Twitter) are still available?
WPBeginner Support says
You could try 301 redirecting the http articles to https but unless I hear otherwise, social media sites see the two as different links so you are likely going to lose your shares unless they have added a method to update your share counts.
Administrador
Ahsan says
I used cloudflare for free SSL but my traffic has dropped 25%. Is this due to cloudflare?
WPBeginner Support says
There are multiple possible reasons for a change in traffic so it is hard to say if that is the only reason or if there were other reasons for a drop in traffic.
Administrador
Shawn says
Thank you for such a great piece of content.
It seems like using the Really Simple SSL plugin is way easier than changing codes and scripts on my own.
My question – what if the plugin did not get updated in the future? Is this going to cause a problem for our urls?
And, after installing the SSL from my web host, all I need to do is to activate Really Simple SSL plugin and everything will be redirected to https?
Shawn
WPBeginner Support says
It would depend on what changes in WordPress’ core code and how long it has not been updated for the possible issues. The plugin should automatically update your content that it is able to use HTTPS without you needing to modify anything on your end if you wanted.
Administrador
Nathaniel says
Just wanted to say thank you. I was not looking forward to doing this, but you’re guide made it easy and quick. Thanks!!!
WPBeginner Support says
Glad our guide could help![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Sheri Ellis says
I made the mistake of following your manual instructions before our SSL cert had been installed. All I did was edit the general settings for the URL to https. And now the site is hosed. I’ve been editing every PHP file to include:
define( ‘WP_HOME’, ‘http://mysite.com’ );
define( ‘WP_SITEURL’, ‘http://mysite.com’ );
and it’s being ignored. So now my site is hosed. FYI I’m using WordPress 5.1.1 which appears to have significant changes. Help!
WPBeginner Support says
You should be able to edit the url back using phpMyAdmin similar to our article here: https://www.wpbeginner.com/beginners-guide/how-to-reset-a-wordpress-password-from-phpmyadmin/
and edit the options table rather than the users table.
Administrador
Sheri Ellis says
Thanks for the response but it didn’t work. I ran mysql command line to update the wp_options table and set option_value to http where option_name in (‘home’,’siteurl’). I have also inserted the define HOME and SITEURL commands into many PHP files including wp-config.php, and also added define( ‘RELOCATE’, true );
Still hosed. Appreciate any additional suggestions!
WPBeginner Support says
You may want to ensure if you have a caching plugin that you disable it, as you are unable to log into the site you could use: https://www.wpbeginner.com/plugins/how-to-deactivate-all-plugins-when-not-able-to-access-wp-admin/![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
otherwise, if you reach out to your hosting provider they should be able to assist
Sheri Ellis says
Had tried that as well, with no luck. I had to blow away the entire site and reinstall WP. But appreciate the effort!
John J Cooke says
This made making the switch a snap. I was sitting on the ssl cert with no sure way how to convert. Really appreciate the easy instructions.
WPBeginner Support says
Glad we could make the process easier for you![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Mandee says
Oh my goodness, THANK YOU! I’ve reached out to my hosting company, as well as a developer. They both made it seem like an impossible task to do on my own. Just took care of this is literally 30 seconds because of you. I can’t thank you enough! I wish I would have found this article sooner—would have saved me a lot of headache!!
WPBeginner Support says
Glad our article could help![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Jerry says
Hi,
I tried twice your step guide end everything worked great. Now that i have SSL i am trying to migrate but there is a problem on the final step, so it cannot be finalized. Is it a problem i had Lets Encrypt on old server and now that the new one has another, to have caused a problem. Would you recommend remove SSL on old hosting and after that using dublicator to start the articles process?
WPBeginner Support says
Who has your SSL should not be a factor for it not working, you could try to see if that works but it is normally due to another cause.
Administrador
BILAL ALI AHMAD says
Hi,
I applied all steps and https version is working fine on my website but the non-https version is still accessible when I type http: mysite.com
how to resolve this issue?
Also when I click on my google search link for my website user also lands on non-https version and after that if I access the website again it comes with https
please tell me how to resolve this issue?
WPBeginner Support says
If you already submitted your site to Google’s Search console then Google may have cached the http version in their search. For the http version being available, you may want to ensure the redirects were all saved.
Administrador
Clement says
This was surprisingly simple that’s why I rely on you guys, had actually thought it would be horrible.
WPBeginner Support says
Glad our guide could make it easy for you![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Marc-Lyon says
Thanks for the great tutorial. Only issue I’m stuck with is that URLs with www appended give an error message in browser:
“This site can’t provide a secure connection uses an unsupported protocol.
ERR_SSL_VERSION_OR_CIPHER_MISMATCH
Unsupported protocol
The client and server don’t support a common SSL protocol version or cipher suite.”
I’ve checked and both non-www and www versions have valid SSL certificates. Any idea why the www version is not working?
WPBeginner Support says
Start by reaching out to your hosting provider to ensure they don’t have a setting on their end for the www specific version of your site.
Administrador
Marc-Lyon says
Managed to sort it out. Cloudflare was causing the issue.
Solution: disable and re-enable Universal SSL under Crypto settings.
WPBeginner Support says
Glad you were able to find the cause and thanks for sharing the solution should anyone else run into the issue![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Rock says
Very helpful blog. Thanks.
WPBeginner Support says
You’re welcome![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
illy says
All my images were inserted with http protocol. I used Better Search Replace to fix this and it worked like a charm!
thank you
WPBeginner Support says
Glad our recommendation could help![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Didier says
I have a problem with the redirect from http to https.
Using the above mentioned code in the .htaccess file,
my index page http:// example.com redirects to httpS:// example.com
BUT
A subpage http:// example.com/sublink does NOT redirect to https:// example.com/sublink
Does anybody know how to solve this?
Thank you!
WPBeginner Support says
You may want to reach out to your hosting provider to ensure they are not overriding any redirects on your site or if they see the code was copied incorrectly.
Administrador
Jason says
Yeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees! The first WP edit that has ever worked first time for me! I’m taking the rest of day off to celebrate.
WPBeginner Support says
Glad our guide could help![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Leo Al says
Thanks a lot!
It worked![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
WPBeginner Support says
Glad our article could help![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Igor N says
Thanks, that was really helpful. I went with the method 2 and everything was just fine.
WPBeginner Support says
Glad our tutorial could help and you got it working![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Pamela says
This detailed article saved a beginner like me! So helpful. Thank you very much.
WPBeginner Support says
Glad our guide could be helpful![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Rafaqat Ali says
Hi thanks for the article, I have shifted my site to ssl by using the article elaborated above.
Let me clear a few things:
1- I have added a new property in Google search console with https:// should I delete the http:// property or remain the both.
2- How long it will take to show google search data in the search console report.
3- Should I make a 301 redirect to https:// version.
4- How to get all my backlinks to https:// version.
( i have submitted the XML sitemap and robots..txt file also with new property)
Thanks for your time
WPBeginner Support says
Hey Rafaqat,
If you have set up 301 redirect to your HTTPS urls, then you can leave them both. They would start appearing in search very soon, however of your redirects are properly setup you wont see any difference in your traffic or search rankings.
Administrador
Belinda says
Thankyou so so much, this article helped me fix both my blog and online store.![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Roberto says
It is an amazing article, I solve my problem and now I have my site up and running. Thanks so much!
Editorial Staff says
You’re very welcome Roberto
Administrador
Eva says
Hi and thank you for the detailed tutorial
I have activated the ssl protocol on a new wordpress installation and after the activation the site’s started opening with https and green padlock ( all pages, with and without www search and if searching http version) even the admin area as far as the theme and editor , however the wordpress and site URL fields in the settings General page still need to be changed to https as they appear as http and any new publication (so as the ones alredy been there) has http link and when editong page appearancefrom main menu it shows exclamation mark oven the secure connection padlock
In that case do I need to go thru all process or after updating the general settings page to https it will be ok ?
It’s my first time doing that and I prefer ( if have to) to do it manually by the 2 method as it very well explained
Thanks
WPBeginner Support says
Hi Eva,
You can try the second method or follow the instructions in the first method. You will need to change the URLs in settings as it tells WordPress to use https in URLs.
Administrador
Bernard Brillo says
I’ve tried following the manual tutorial but I end up seeing a blank white page on my homepage and all of my other page are now inaccessible. My website is hosted in Amazon and I’m also using W3 total cache.
Do I need to do something else to make this work?
Any suggestions will be much appreciated.
Donatas Vaiciulis says
On my website was W3 total cache, when I disabled it worked everything fine. I think after htaccess edit needed to reinstall plugin and do w3 settings again. Not tried yet, soon will try.
Josh says
I did method 1 and it worked perfectly. Thanks so much for the tutorial!
Karo Itoje says
Hello,
As usual thanks for the detailed tutorial. I decided to do the manual option (option 2) because it seemed simple enough to follow through. However when I pasted the second code for nginx servers into configuration file (wp-config.php) I got a syntax error. So I had to remove the code. But I will still like to follow through with that option so if you can please maybe take a look at that code again and correct it then I’ll really appreciate it.
Also just to get this clearly, it is either:
“set up WordPress redirects from HTTP to HTTPS by adding the following code to your .htaccess file.”
OR THIS
“If you are on nginx servers (most users are not), then you would need to add the following code to redirect from HTTP to HTTPS in your configuration file:”
Not both right?
mostafa elaissaoui says
thank u
realy you help me thank you
Rohan Kothari says
Hi,
I am planning to start an e-commerce store. Do I need to purchase a wildcard SSL certificate and a dedicated IP to enable payments on my website or will the free SSL certificate bundled with web hosting plans be adequate?
Oliver says
Hi Guys,
1st off a great and helpful article, thanks. I have changed my site from http to https and it took a lot less time than I expected, using the Better Search and Replace manual method. But now I can’t seem to change the address of the http version in the Google Search Console. It has both of the sites there but won’t allow me to swap. Is this necessary to do? It seems as if the redirects are working. Should I get the https site indexed as much as possible or will google do that with the http redirects anyway?
WPBeginner Support says
Hi Oliver,
If you have both sites in the search console and a redirect in place, then Google will automatically detect the transition and will start showing reports for your HTTPS site.
Administrador
Victor Fernando says
I used the first method, although I have experience in programming, I don’t have it in wordpress and I don’t dare to get my hands on the code even though it’s not that complicated.
the first method worked i.e. installing the free plugin version.
Thanks for the tip