Could anyone help me to uninstall/reinstall wordpress properly?
What i tried to achieve:
I tried to install wordpress as a second website with different domain name following this, this and this guides. Example:
Main website as domainone.com
Wordpress store as domaintwo.com
Under general setting i changed the URL for both WordPress Address (URL) and Site Address (URL) and then ran the appropiate commands as listed in the guide.
Now this is where i did the first mistake that i noticed much later. I did a typo in the URL here, so worpress didnt showed up when i tried with the URL domaintwo.com and from then on i started to change things till i messed up everything properly.
-I tried then uninstalling with yum remove nethserver-wordpress, deleting the folder /usr/share/wordpress and /etc/httpd/conf.d/wordpress.conf file.
-After reinstalling i am still unable to either access domaintwo.com nor domaintwo.com/wordpress to correct the issue. Error is stil: Not Found
Is there anyone who could possibly help me do a proper reinstall or to correct the issue?
Thanks for the quick reply. I would prefer to start with a fresh install. Would you mind showing me how i can remove the old database? i looked this, but couldn’t figure out. When i run a ls -al /var/lib/nethserver/db/, the wordpress database doesnt even show up in the list
@stephdl
I think i got it finally. Thoiugh i managed to access the database thanks to this post, i did a mistake again of course, and forgot that semicolon when ran SHOW DATABASES. I deleted the database using this.
Went through the package uninstall and removal as described above. Rebooted the server, just in case and ran the installation again, but the same error: Not Found.
I noticed that the folder /usr/share/wordpress got recreated, but it contains only a tmp folder. Running a search for wordpress i found another folder /etc/wordpress/ which contains only wp-config.php.
Any hints?
@stephdl
I did the reinstall process again. It looks as follows:
yum remove nethserver-wordpress
cd /usr/share/
rm -R -f wordpress
cd /etc
rm -R -f wordpress
cd /etc/httpd/conf.d/
rm wordpress.conf
config delete wordpress
mysql -u root -p -> get the password from cat /var/lib/nethserver/secrets/mysql
show databases;
drop database wordpress;
show databases;
exit
yum install nethserver-wordpress --enablerepo=stephdl
Looks bit better cause it says this time:
Forbidden
You don’t have permission to access /wordpress/ on this server.
I ran:
ls -l /usr/share/wordpress
total 0
drwxr-x— 2 apache apache 6 Mar 29 21:20 tmp
well, if yum would have done it’s job properly, i wouldn’t have come to the idea to remove any file, chown, etc…, or use cli at all. Reinstalling with yum did put me in the same situation as before.I tried to look at the httpd debugging guide, but that would be a too big learning step for me right now. so you were right, reinstalling was a quicker solution.
I confirm, yum does it…remove files and take care of file permissions.
But nethserver-wordpress doesn’t create the mysql db if it previously exists and the e-smith database is not removed by yum. Hence for any nethserver-package you must remove manually the mysql database and the esmith database if you want to start a clean install.
I am not arguing, yum probably does it right, but some other thing did go wrong in my case, even after the first yum removal. It makes sense that after reinstallation the url pointed still to the wrong url in the db, which had a typo, but even with that i couldn’t access the site either.
Anyway, it will stay a miracle what was wrong there, for now. I have a clone of that server and plan to investigate further for learning reason, once my skill allows it more effectively.
Thanks for your effort though, i appreatiate it a lot.
Edit: would it make sense to add the reinstall steps with the db removal to the wiki?
I am so new here i doubt i can write to the wiki. Would be like giving a smartphone to a one year old.
EDIT:
Will the wordpress installed this way be included in the server backup? If not, can you tell me what has to be added here?
@stephdl
Either including it to the RPM for lazy people like me, or adding the howto to the wiki both good enough.
If you want i can modify the wiki with my experience and pm it to you. If you like it, you can then update the wiki.