How can I install wordpress to run on my local server - wordpress

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!

Related

Moving backed up Wordpress from subdirectory to root

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.

Wordpress Admin is broken due to error, how can I download a wordpress site from FTP to local?

As I understand it, the normal process for copying a live wordpress site to local is done through the Wordpress Admin panel, unfortunately this is broken and giving me an error.
How would a person download a wordpress site to local the hard way by copying the files over FTP?
I am not the site owner, and am being brought in as a favor to the site owner, the site has been live for years and suddenly broke (probably the plugins)
Step1 if you have live website FTP or control panel then
open it and create a zip file from Cpanel of the live site WordPress directories . if you have FTP then connect the FTP and select all files and drag it to the right to left into the new folder on the left side
Step 2 when files will move to your system then start your localhost control panel, into ht docs folder move directories of WordPress here which one you recently downloaded from FTP of control panel make sure if you download zip folder from control panel it should be extracted first.
Step 3 open you PHPMyAdmin and then create a database the name whatever you would like to .Then into ht docs WordPress folder open wp-config.php files and change the name of the database , the username will be root and password will be blank.
Step 4 now go to your live site control panel and open PHPMyAdmin, open the corresponding database you can find the database name from the live site wp-config.php file. Now export it to the folder on desktop or you can direct put it to the desktop.
Step 5 extract your live site database and edit it with a text editor something like notpad++. now press ctr+f and then select find and replace tab.Into finding input paste your live site name something wpbeginner.com and into replacing tab paste the localhost directory which one hold the files of WordPress you recently moved something like localhost/yoursite.Hit the replace all tab.
Step 6 Now create a zip file again of the database which one recently open in text editor, go to you PHPMyAdmin localhost and open the database which one you create for the local website. Click on the import tab and then import your live database which one you created the zip from the text editor.
Step 7 on your localhost/yoursite/wp-admin enter the username and password of your live website login and it will open the wp-admin dashboard click to visit site , if it is reidrecting to the live site then goto your localhoset/phpmyadmin select the corresponding database and the select the table wp-option table and change the url from live to you localhost directory
That's it

After moving the destination of my WordPress folder and renaming my project, I can't access wp-admin

I moved the destination of my WordPress folder in Finder and can no longer access wp-admin. I'm running MAMP and it's working, but I cannot access wp-admin and am receiving a 404 Not Found page.
My WordPress folder used to be part of Sites/HackerYou/Week7/WordPress. Now it's just Sites/WordPress. The project I'm working on reminds inside the WordPress folder and it has been renamed.
When I go to localhost:8888, that's where I'm receiving the Page not found notification. This is my WordPress so apologies if I'm not providing enough detail, please let me know if there's anything I can add to help you answer the question.
Edit: I have also changed my database name in phpMyAdmin and the wp-config file to the same name that I've given to my project folder.
Try changing the path to your new directory in phpMyAdmin. Go to MAMP > Tools > phpMyAdmin. Select your database and click on wp_options. You need to change the path to your new directory for the "siteurl" and "home". The "home" option might be on the second page.
If you migrate folder mean, Follow these steps:
1) In your database change homeurl & siteurl
2) After migrate update your permalinks
3) Now also getting problem then open you config file
you can enable debug mode (i.e) define('WP_DEBUG', true);
it will show error statement.

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');

How to move Wordpress to another domain without the chance to make a proper backup first?

So my webhoster closed down, where I hosted my Wordpress blog. I was able to receive a zip file containing all my data. I now have a new webhoster and I extracted the zip file to its root directory.
Trying to open my website now gives me "Error establishing database connection". The web tells me it may be related to hardcoded urls in the Wordpress database, which I need to replace by the new url.
However the tutorials usually tell you to use the Wordpress interface to create a backup of my database first, which can then be edited in tools like phpmyadmin. I can not access the Wordpress interface anymore and so far did not manage to edit the database otherwise.
I tried placing a local copy of the blog in the "C:\xampp\htdocs" folder, hoping phpmyadmin would recognize the database and allow me to edit it. Not working, maybe I am doing something wrong?
Any ideas to revive my Wordpress blog?
Cheers
Okay I think I got it working. For people having the same issue:
I loaded the database locally by copying the *.myd, *.myi, *.frm files to a new folder in my local xampp installation (e.g. C:\xampp\mysql\data\myDatabase).
I then used phpmyadmin to export this database to a .sql file.
On my webserver I then installed a fresh wordpress blog. It might be enough to copy your existing wordpress stuff, without needing to do this step afterwards, not sure.
My webhost has phpmyadmin preinstalled, so I used that to delete the fresh wordpress databases and import the .sql file instead. Now everything is in place, but since I changed my domain I need to change the URL paths in the database.
I used this script (use it by placing it on your webserver in the wordpress root folder and calling it in the browser) to do a search&replace of my old url to the new url: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
After that I only had to manually fix the path to my header image that I had edited in the past in the theme's header.php file.
Phew. Thanks for your help f00644.

Resources