Moving WordPress Website To New Location On HDD
-
Hi guys!
A friend is paying huge amounts of money (thousands) for webhosting with GoDaddy and they asked me to build them a Linux box (CentOS6) to host their wordpress website locally at their home business.
I couldn’t find a default ‘public_html’ folder on a fresh install of Linux but I noticed that everything web related wanted to install in /var/www/html/ by default.
The default location for WordPress to install to is /var/www/html/ but on the GoDaddy linux box it was installed to /home/username/public_html/ and so when I move the files to the default install location it complains that the files are in the wrong location, and when I move it to the correct location in the error logs it then gives me permissions errors.
Has anyone tried to move a WordPress website without the use of CPanel / WHM? They have it at the GoDaddy end but they don’t want to pay for it in the new install (US$425 per year just for something they will only use once or twice) so I’m having a bit of bother.
Does anyone know how to change the default install location or change the links in the website so it looks at the default website location instead?
I see that the /etc/httpd/conf/httpd.conf file says it should be in /var/www/html/ folder.
I’m using this code to install LAMP:
[code]sudo yum install httpd
sudo service httpd start
sudo yum install mysql-server
sudo service mysqld start
/usr/bin/mysql_secure_installation
sudo yum install php php-mysql
sudo chkconfig httpd on
sudo chkconfig mysqld onmysql -u root –p
CREATE DATABASE database_name;
CREATE USER database_user@localhost IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON database_name.* TO database_user@localhost IDENTIFIED BY 'password';
FLUSH PRIVILEGES;database_name < database_name.sql
exit[/code]
I’m using this code to install WordPress:
[code]sudo yum install php-gd
sudo service httpd restart
cd ~
wget http://wordpress.org/latest.tar.gz
tar xzvf latest.tar.gz
sudo rsync -avP ~/wordpress/ /var/www/html/
mkdir /var/www/html/wp-content/uploads
sudo chown -R apache:apache /var/www/html/*cd /var/www/html
cp wp-config-sample.php wp-config.php
nano wp-config.php[/code]Can I change the /var/www/html/ to /home/username/ ?
If I try to go to my local IP address will it find it? Will WordPress figure it all out by itself or do I have to change the /etc/httpd/conf/httpd.conf file?
I tried the export / import tool but the WXR XML file was too big to import (5MB, max limit 2MB), and even then it apparently doesn’t import the theme which is important because it is a custom-made theme and the website breaks without it.
Without blowing away my CentOS install, is it possible to uninstall WordPress if I’ve put it into the wrong location?
The blog I need help with is: (visible only to logged in users)
-
Hi there,
That site is not hosted by wordpress.COM. Our support docs do not refer to it and we do not provide support for it. You have a wordpress.ORG install and are posting to the wrong support forum. We cannot help you here with that site at all.WordPress.COM and WordPress.ORG are completely separate and have different username accounts, logins, features, run different versions of some themes with the same names, and have separate support documentation and separate support forums. Read the differences here http://en.support.wordpress.com/com-vs-org/
If you don’t have a username account at WordPress.ORG account, then click http://wordpress.org/support/ and register one on the top right hand corner of the page that opens, https://wordpress.org/support/register.php so you can post to the support forums there.
Resetting your WordPress.ORG password http://codex.wordpress.org/Resetting_Your_Password
WordPress.org support docs are at https://codex.wordpress.org/Main_Page
- The topic ‘Moving WordPress Website To New Location On HDD’ is closed to new replies.