How to use existing database in a WordPress website? - php

I already have a database. I have tried both manual and one-click installation of WordPress for my blog in a freehosting.com.
After one-click installation, by using phpMyAdmin, I removed the previously installed empty tables from the database and uploaded my tables from the database I already had. That didn't work (my blog showed nothing).
And after manual installation, I did the same. Now my blog opens but can't redirect to any page. It shows an error:
Not Found
The requested URL /page/2/ was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
How can I fix it?

There was an issue with the compatibility of the database (older .sql) file for the newer WordPress version. I fixed it by installing the older version of the WordPress. Then I removed old tables and uploaded my own (old .sql) tables and upgraded WordPress and database. WordPress helped me to update the database by one-click. This fixed everything.
The old WordPress database consists of 12 tables but the newer version consists of 13 tables. This is why I had to install the older version of WordPress for the compatibility with the older version of the database.

This happens because WordPress keeps links(permalinks) to all your posts and media files in database, to solve this issue you may have to change some settings
Go to Admin->Settings->General and change your WordPress address and site address
Go to Admin->Settings->Permalinks and review all permalink structure
If previous steps do not help got to phpMyAdmin select {your_prefix}options and change the value for 'siteurl' and 'home' fields to your site's url

Related

MISSING UPDATES FOR: MEDIA Drupal 9

I have started facing an issue with locally hosted Drupal 9 (Xampp, Windows 10). The issue started when I was trying to create events in drupal 9 and I was redirected to Install.PHP page. However, upon checking I was redirected to Update.php and the error seems to be as mentioned below.
Install.PHP page message:
Drupal 9.2.2 Drupal already installed To start over, you must empty
your existing database and copy default.settings.php over
settings.php. To upgrade an existing installation, proceed to the
update script. View your existing site.
Update.php Page Message:
MISSING UPDATES FOR: MEDIA The installed version of the Media module
is too old to update. Update to a version prior to 9.0.0 first
(missing updates: media_post_update_collection_route,
media_post_update_storage_handler,
media_post_update_enable_standalone_url,
media_post_update_add_status_extra_filter).
I'm well aware of the fact that Media is a core module and I havent tried upgrading it or my site. My site has always been a D9 installation and there were no migrations etc. I would really appreciate expert help on this issue.
Running this in a function in my .theme file did the trick for me:
\Drupal::service('update.post_update_registry')
->registerInvokedUpdates(['media_post_update_collection_route', 'media_post_update_storage_handler', 'media_post_update_enable_standalone_url', 'media_post_update_add_status_extra_filter', 'setting functions as applied according_to_the_error_message']);
I personally used hook_theme() (Make sure to clear your cache for it to run and also remove this code once the issue is fixed.)

WordPress Site missing Dashboard after migration

I had a WordPress installation which I recently moved to a new Linux host. My host is for three website. I already had a WordPress site at the home directory (/public_html/). The later installation is at 'public_html/mukharsamvad.com'. The first WordPress installation is working fine. But the website with domain name 'mukharsamvad.com' is not showing any media (photos etc.). Even after logging into 'wp-admin' it doesn't directs to dashboard. Admin bar appears at the top, but doesn't have any menu or option.
After checking the URLs of images, I have found as 'http://mukharsamvad.com/wp-content/uploads/2019/10/nitish-kumar-11-1.jpg/'. It is treating it as directory. Please recommend me fixes.
Removed old installation and re-install WordPress. After restoring database, problem with image urls solved, but Dashboard still missing.
Here what you can do
check by deactivating all the plugins
change the theme
if not worked , switch for theme editor.
install classic editor plugin and enable it
if this not worked ,
inspect element & check console for errors.
it sounds like you are missing file of Wordpress I would suggest you to compare each directly with installed WordPress if you still don't solve problem then take backup of migrating WordPress installation do fresh installation then override the backup files

After updating XAMPP, existing Wordpress sites redirect to an install page?

I recently updated to the current version of XAMPP. Before the update, I made a backup of all my htdoc files (all Wordpress installs), and then uninstalled XAMPP.
But I failed to export my databases. (My bad.)
Now when I try to access my local sites, I am brought to the 5-minute installation page for Wordpress—with the notification that users already exist. (Screenshot of the Wordpress install page here.) The install process only produces database errors and tells me that tables already or don't exist. At the bottom of the page I am told to log-in...which brings me to a 404 error.
Ugh.
I have tried exporting the .sql files I'm particularly desirous to save and importing them in new databases...but to no avail.
Any insight? Are my sites toast, or what can I do to restore all my work?
Learned through another coder that all my data is indeed toast. Don't know exactly how this happened, but as a warning to y'all: Find and follow instructions to upgrade XAMPP before proceeding and take every precaution you can!

Migrate Wordpress Blog Data from Very old version to new

I have one blogging website created in wordress old version, (Where for every users blog and post wordpress use to create new database and table), but in latest wordpress, I found for all users information is stored in single database.
I have recreated my website with latest wordpress version. Now just wanted to migrate data (Inclused users and users posts) from existing website OLD to the NEW website.
Any help and suggestions would be highly appreciated.
I guess the way with least trouble would be to get all main releases between the old version and a current version. Then install them in a local system and upgrade the version plus data one version at a time.
Sounds tedious though.

Using old database after magento install

My site was messed up by a novice developer and I had no option then to delete the old files, and install a fresh copy of magento 1.7.0.2 . My old Magento version was 1.6.
I want to use the old database as I got all of my product listing on it and everything is on that database. I find no way of getting those table (and in fact they are so many in number that its almost impossible to remember their names) in to my new installation..
I tried point my magento installation to old database by editing local.xml but was un-successfull as magento was throwing errors again and again..error was
table already exists and some description
and to me, these errors make sense
can somebody guide me how I can point my old database to magento without errors or how I can load my old data in to new magento installation..
I fear that simply importing sql database might not work
thanks
You can also try to use a copy of the old database and install a new magento store over the existing database. That's what I've done so far and I could continue using the existing products. Be sure, that the database isn't corrupt.
Download the latest version of magento and start the setup routine. When Magento asks for the access data of your database, use the acess data of the "old" database. Magento will automatically upgrade your Database to Magento 1.7.
After that you have to install your theme and all the extensions you used in the old shop. Be sure, they are working on magento 1.7. And you have to copy the media folder, to use all images of products and categories.
This may help you:
http://indieswebs.com/blog/upgrade-to-latest-magento-using-fresh-install-technique/
http://neoshops.de/2013/08/03/how-to-upgrade-magento-using-old-database/
I would try importing the old database first. It will get everything as long as it completes successfully. This page has detailed instructions: http://www.magentocommerce.com/wiki/groups/227/moving_magento_to_another_server
If the db import fails, Magento often makes changes (even if minor) the structure of its database between versions. Your best bet is to install the exact same version of Magento (1.6.something) then, point it to your old database by editing app/etc/local.xml. You should clear your cache so Magento loads the new version of the local.xml - Admin->system->cache manager->allcache->refresh
Then you can update to the latest version.

Categories