Question

can't finish my wordpress installation

Posted March 1, 2020 165 views
DigitalOcean Managed MySQL Database

Hello.
I created a droplet and selected ubuntu 18.04 with wordpress image.
then i login to console to continue installation and after it says successful installation i am trying to login and this is what i get https://i.imgur.com/vv6uNxN.jpg
and the browser inspect i get this: https://imgur.com/ydukMDJ
you can probably see the _c in the url and this is why it is not working.
To mention that during installation when asked domain i press ctrl+c to exit script…
Any suggestions?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @andreipac2010,

Most probably the Values in the Wordpress database for ‘home url’ and 'site url’ are wrong. As such you have 2 options, either start from the beginning, if you haven’t added anything to the Wordpress installation or change the values.

The first option, is pretty much clear, delete everything and start from the beginning, let’s check the second option and how can we change the necessary fields.

Change your home and siteurl manually

So, first you’ll need to SSH to your droplet.

ssh root@YourDropletIp

The WordPress droplet, creates the DocumenrRoot in var/www/html. Go that folder and check the prefix of your database like so

cd /var/www/html/
grep 'DB' wp-config.php

The database should be named 'wordpress’ but let’s do it to be certain.

As soon as have the Database name, enter your mysql using the following command

mysql

Now that you have entered, you’ll need to start using your database so

use DatabaseName;

As soon as you do, you’ll now be able to executing queries. Now if you run

select * from wp_options where option_name='home';

You’ll most probably see that the optionvalue is not your domain but ’C’ or something similar, we’ll need to change this. To do so, please execute the following querries

UPDATE wp_options SET option_value = replace(option_value, 'oldurl.com', 'newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';UPDATE wp_posts SET guid = replace(guid, 'oldurl.com','newurl.com');UPDATE wp_posts SET post_content = replace(post_content, 'oldurl.com', 'newurl.com');

Please note you’ll need to change the 'oldurl.com’ with what it says in the option_value from the last query you ran. In order words the old domain name.

Additionally, you’ll need to put in the newurl.com as well. It can be http://example.com or http://domain.com, it depends on you but please make sure to add http or https depending on the protocol you wish to use.

Regards,
KDSys

Submit an Answer