Online Marketing Strategies

Ultimate Cheat With Moving Wordpress.

2016-08-07 | 3254 Print Friendly Version of this pagePrint Get a PDF version of this webpagePDF


Quick Tips About WordPress Migration.

"If you have ever own a wordpress site then at one point in time you must have fall victim to moving wordpress folders to root directory or giving 403 forbidden wordpress url issues or migration issues etc. Today you are in luck has I will recommend a solution that solves them all, without the need or use of plugins or paying someone to do the same technique shared on this post".

WordPress is definitely a huge deal to make off with, especially if you have got a lot of domains using the platform. I have decided to share some useful tips when I actually got myself in the fix of moving WordPress from a subdirectory to the root directory of my domain. That is moving mydomain.com/WordPress folder/ to mydomain.com, in a more appreciated description I want to move WordPress to root folder like this root/public_html/WordPress folder/ to root/public_html.

seo web analyst blogger community

Now this gave me a lot of headache, infact the first WordPress error I had was a 403 forbidden error when I installed WordPress in a subdirectory folder in order not to take down the main website while the new one was under construction. Below I will put you through all the challenges and how I fixed them.

How to Fix the 403 Forbidden Error in WordPress.

I had to do a lot of Google searches for this one, and I was pretty in luck to actually find one that worked for my kind of scenario.

From my researched I got to know that there were various cases where you can have this error. For example:

  • 403 Forbidden – Access denied on wp-admin or WordPress login page.
  • 403 Forbidden – during WordPress install.
  • 403 Forbidden error when visiting any page on your WordPress site.
  • It is also possible that you only get to see ‘Access Denied’ instead of full 403 Forbidden status.
  • You may also see ‘Access to yourdomain.com was denied. You don’t have authorization to view this page.’

The error I got from my forbidden error message was more like this

403 Forbidden – You don’t have permission to access ‘/’ on this server.


Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

What I did was to check my .htaccess file for the WordPress, and it turns out that I had to edit the code to include the path to my subdirectory where am trying to call the WordPress site from.

Original code in wordpress .htaccess

# BEGIN WordPress



RewriteEngine On

RewriteBase /

RewriteRule ^index.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]



# END WordPress

My edited code to include subdirectory

# BEGIN WordPress



RewriteEngine On

RewriteBase /new/

RewriteRule ^index.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /new/index.php [L]



# END WordPress

That was all /new was my subdirectory where I installed the WordPress site and instead of WordPress calling itself from /new subfolder it was trying to call its self from my root folder.

Now I have gotten access and was able to run my WordPress admin section, installed my theme and design the template to resonate the website business and services.

 

How to move WordPress site to the root domain.

What I did was simple, I first backup (by moving it) the initial site into a folder and named it "old" and next was to transfer WordPress site to the root folder. But prior this action I had to login to my WordPress admin dashboard  went straight to the settings and edited the WordPress url and website url to the new domain eg changed the http://www.yourdoamin.com/subdirectory  to http://www.yourdomain and then click on save button below.

After this I went to my phpmyadmin via cpanel and check my data base and click on word press  database I have for the site. I was looking for wp_options [wp_ because I installed WordPress with the suffix]. In the table  option value you will see the two urls for WordPress url and site url, this is only for confirmation that the editing we did on admin had been saved.

Now you will think this would have solved my headache but to be frank it did not, because when I visited the site it actually loaded but with missing images as seen in the picture below, I had a very out of shaped website.

seo web analyst blogger community

Now if you have this kind of situation where the images of your theme or css files are not loading properly, then you need to follow this steps as highlighted below. I really tried to get help online but none worked until I simply gave all this options a try.

1.) Login into your cpanel and go to phpmyadmin, what you need here is to download the sql file of your database for the entire WordPress site.

2.) click on export and choose SQL as your preferred option to download and click on GO.

3.) Your download is complete, so you open it with a notepad. Find and replace the following PS NOTE: NEW was my subdirectory folder for wordpress.

/new/ replace with /

/new/ replace with /

yourdomain.com/new/ replace with yourdomain.com/

You can locate the find and replace on note pad from edit input the text above replacing "new" with your subdirectory folder name 

seo web analyst blogger community

4.) Next you upload the file you just worked on (please save file as it is, do not change or edit the text.

5.) To upload the edited SQL simply click on import then import the SQL and let it populate, when this is done simply go to wp_post and edit some old urls by changing wp_post urls in guid (on phpmyadmin,) edit the urls you have that are not pointing to your new website.

6.) Delete WordPress .htaccess, re-log into the admin and go to settings and resave it again, this will repopulate the WordPress .htaccess.

7.) Then try to copy the original code for WordPress .htacess (like the first one above) and save  back to server.

8.) Then clear your browser cache and then visit the new website site, everything should now load perfectly.

I did all this without a plugin. So can you. checkout the result wordpress website

 

Pretty Permalinks 404 and Images not Working.
Now in another case scenario that you might be experiencing 404 errors with pretty permalinks and a white screen when you upload images, mod_rewrite may not be enabled in Apache by default. Mod_rewrite is an extension module of the Apache web server software which allows for "rewriting" of URLs on-the-fly. It's what you need to make pretty permalinks work.

There are lots of plugins to use for all of this scenarios, but I preferr to do it manually as it helps reduce the number of plugins on your server, hence reducing the server load and disk usage.

If you have other solutions please do share them in the comments below, by the way this same system can be used for migration of WordPress or transfer WordPress site to new host or domain.

 


comments powered by Disqus

Ads

custom ads side bar

Author

authors image profile

Olatunji Adetunji

I am a seo web analyst and have a love for anything online marketing. Have been able to perform researches using the built up internet marketing tool; seo web analyst as a case study and will be using the web marketing tool (platform).

Subscribe RSS

Subscribe with Subscribe with facebook Subscribe with google Subscribe with linkedin Subscribe with TwitterSubscribe with Yahoo   

OR




This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

More Posts From Online Marketing Strategies


Random Blogs




AuctionCars
Licensedclearing Agent
carauctions
Online Marketing Strategies
carauctions
LicensedclearingAgent