Moving backed up Wordpress from subdirectory to root - wordpress

I have a question regarding moving a backup from http://websitename/subdirectory.com to http://websitename.com.
What is the best approach to do this?
I have the backup from the subdirectory on my pc and currently on the website root there is a clean Wordpress installation.
There are alot of pictures, the Avada theme there and other media files.
If I just copy the files via FTP will it crash or will the URLs be broken afterwards?

This will take a couple of steps to but here is the basic steps required.
Download the database from phpmyadmin (or however you access your sites database).
You should have a .sql file now.
You need to do a search and replace action on the full url for the site in the subfolder to the new location where it will live at the root. Your goal here is to get the subfolder out of every url on your site. Example, your current url is this: https://example.com/subfolder/ - you will need it to be https://example.com/
Save that version of your database as a new file called import.sql.
To be safe, I would create a new database, database user, and database password and import this new version into it. Store these values database name, database user, database password and database hostname. You will need them later.
Plugins
Download all of the plugins from /subfolder/wp-content/plugins/ folder and upload those to the /wp-content/plugins/ folder in your root level fresh install of wordpress.
Themes
Upload your theme to the /wp-content/themes/ folder from your /subfolder/wp-content/themes/ folder.
Uploads
Download everything in the /subfolder/wp-content/uploads/ folder and upload to the /wp-content/uploads/ folder.
Update your wp-config.php
That database that you created and imported your database in Step 1 here, you'll need to update your wp-config.php with the new database name, database user, database password and database host.
The last step here is to upload the wp-config.php to the root file and this will point the site to the new database.
Login to wp-admin
Login to wordpress at the root example.com/wp-admin/. Go to Permalinks settings and save them. Sometimes you have to do that to flush the permalinks and make subpages work.
Test your site
Go the frontend of your site and test everything to make sure that everything is in working order.

Related

How can I install wordpress to run on my local server

I've tried this over and over. Changed my config.php file everytime but my database information never seem to work right. How do I correct this? Thanks.
To set up a new WordPress site locally, follow the steps below:
Download MAMP here.
Download WordPress here.
Create a directory that will hold all your WordPress sites.
Open MAMP and go to Preferences > Web Server and change the root directory to the one you just created.
In the root directory, create a folder that will include a WordPress site.
Copy and paste WordPress files (from step 2) into the folder (created in step 5).
Create a database by going to http://localhost:8888/MAMP/index.php?page=phpmyadmin > Databases, adding the name of your choosing under Create database, clicking create.
Go to http://localhost:8888 and click on the directory that has your website.
Install WordPress. Enter "root" for both username and password. For database, enter the name of database you created in step 7.
Enjoy your locally-hosted WordPress site!

wordpress database not showing in PhpMyAdmin

I am new to wordpress and have bought udesign theme from themeforest. from my Plesk I have installed WP and then from the dashboard of WP tried to upload the theme, but failed. hence went directly to dedicated server and hosted on the root folder.
Theme started reflecting on the dashboard and I have started customization. Once site completes I need to move the site to production server. When I check PhpMyAdmin from the plesk, it shows there is no DB table. how do I copy/move the site without DB?
Can i manage site without PhpMyAdmin? like copying the entire assets to new server and it starts working automatically?
Please help me to find DB or Let me know how to work with the themes to make sure everything in right place.
Many Thanks,
Gururaj
If you’ve ever had the need to find the name of your WordPress database, then there’s an easy way to do that – simply look for it in your wp-config.php file located in the root folder of your WordPress install.
Accessing Your WP-Config.php File
If you are doing something where you need the name of your database, then I’m assuming you have access to your server.
Simply go to the main folder of your WordPress install and locate the file called wp-config.php.
Edit file and find name in:
define('db_name','your database here');

Wordpress Domain Mapping, which folder(s) to backup?

It took me a while to get domain mapping working on wordpress. I set it up using debian. I was just wondering which folders I should backup in the event of a server re-install where I can just drag in the saved folders and domain mapping should be working again. Unless I have to go through the steps all over again.
You should backup all user generated files like plugins, themes, and upload files which are all under in the wp-content folder. Also, take care of the wp-config.php which includes the db connect setting of your site and the .htaccess file which contains the server config for your site.

How to move a localhost wordpress site to already registered wordpress domain

I have built a wordpress site locally. Now I want to host the site globally .
I already have bought a wordpress blog domain (i.e. It changed the site name from xyz.wordpress.com to xyz.org )
Now how I can transfer my local plugins and themes to xyz.org ??
Move all files with wp-admin, wp-content, wp-includes into your host.
Delete wp-config.php file.
Go to site URL EX: example.com and go through typical installation procedure.
Go to your database in your host and delete those 11 tables which have made.
Now you should export the local database and you should open it in any text editor and search and replace your local URL with new one.
Ex: localhost with example.com, then import it to your database of real server.
Now It should work.
To do this you have to go through these steps
1) Make a zip of your wordpress folder and upload to your domain.
2) Export your local database..Open it in any editor which has find and replace.now search for your local server name and replace it with your domain..For eg find this xyz.wordpress.com and replace with xyz.org in entire database
3) upload your database to live make changes in config file your db name ,username,pass
and you are live now
OR
check these tutorials for reference
1) http://www.wpbeginner.com/wp-tutorials/how-to-move-wordpress-from-local-server-to-live-site/
WordPress.org provides the open source code for WordPress that you can run on your own website, with whatever plugins you choose.
WordPress.com provides (free) WordPress hosting, but you are limited as to what plugins and configurations you can make to your site.
read more about

Wp admin page isn't accessible

When I go to http://www.cowrubber.com/wp-admin
the url changes to
http://cowrubber.com/wp-admin/cowrubber.com/wp-login.php?redirect_to=http%3A%2F%2Fcowrubber.com%2Fwp-admin%2F&reauth=1
Somehow I just can't access the admin page to login.
I have copied the site from an test site on the localhost. And changed the url's in the database to the new ones but due to unknown reasons I just can't access the admin site.
When you move a wordpress to a differently named domain, it is not ehough to just search and replace in the database, because wordpress (sadly) store a lot of things in serveral table in serialized format.
So what you need to do is, in your case:
Create a backup of your local database.
Create a backup of your current production database and file.
Delete all the files from your production server, and drop all table from production database.
Copy all files to your production server from localhost.
Import the local database to production database.
Do not open the production wordpress site in the browser!
Go to here, and download the newest script: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Unzip it into a wp_replace directory.
Upload this directory to your document root, where wp-conifg.php is.
Go to the http://example.com/wp_replace/
Fill the From and To fields, without http:// and without trailing slash. Eg: somethinog.localhost to 'example.com`
Live run it. You will see, how many records changed in wich tables.
Delete this wp_replace directory. If you leave it, add a htpasswd to it otherwise anybody can crash your db.
Go to the WP admin, navigate to Options -> Permalinks. Push save.
Now you can use your new domin :)

Resources