Forum Replies Created

Viewing 15 replies - 1 through 15 (of 57 total)
  • Thread Starter aajax

    (@aajax)

    While I certainly don’t understand what’s going on I have discovered something that appears to be relevant. I do have several instances of sites operating with the same underlying software (i.e., plugins etc.) on my test system. My intention has been to access them with different URLs. They were created by copying everything in the root WP folder to a differently named folder. The database was then exported and imported to one using a different name. Then the database credentials get revised in WP-Config.php.

    When the error occurred WP-Config.PHP did not set the site URL. However, when I do set the site URL the login works as expected. This is not the first time I’ve used this technique and I think it works fine with respect to WordPress. However, I now have reason to believe that this is not true for plugins which I’m using in this case. Therefore, it looks like the login problem is somewhat minor when compared to the bigger problem that does pertain to plugins. Also, I think the support I need for that would be from the plugin provider.

    Thanks for trying to help.

    Thread Starter aajax

    (@aajax)

    I absolutely did type the username. Not just once but over and over again using at least 3 different browsers. The website in question uses a multitude of plugins. How they interoperate is a mystery for me but without them I would not be signing into anything useful nor able to undertake any corrective action. There is no benefit to just signing into WP without the stuff that delivers the goods. The website does require administrative access in order to setup all manner of things using those plugins. In this case, it is a website that is used to display photographs and it is WP that is preventing me from taking corrective actions.

    Thread Starter aajax

    (@aajax)

    Photocrati Support did provide a recommendation that seems to have resolved the problem.

    It basically amounted to referring me to this explanation.

    Thread Starter aajax

    (@aajax)

    Per mbsharp, the problem arose initially on WP 6.2 but only for the instance running on PHP 8.2.12. Things work as expected/desired with the same instance running on PHP 7.34.33. I did create another instance in order to see if the WP version may have been a factor but the problem still exists.

    The reason this is happening on my test systems is that I like to avoid such problems arising on my operation instance which is running on my hosting service. In that I wanted to test the upgrades before changing the operational system. However, in this case it is not the software that I have any control over which seems to be causing the problem. My hosting service does allow choosing between a few different versions of PHP but I do think that eventually I’ll need to update.

    Thread Starter aajax

    (@aajax)

    My apology when I clicked submit an error was displayed and I failed to recognize that the topic was posted. Please refer to the more recent posting of this topic.

    Thread Starter aajax

    (@aajax)

    Looks like this problem was caused by being on a newer version of WordPress for which it became necessary to disable “Legacy Mode”. Looks better now.

    Thread Starter aajax

    (@aajax)

    That sounds like what I called “having to actually select it and examine the results”. Looks to be a very tedious process if one were wanting to actually know what there is to select from. What would work is to have a printable page that utilizes each of the fonts with some demo text that would accentuate the appearance.

    “Having to actually select it and examine the results” is basically unusable.

    Thread Starter aajax

    (@aajax)

    Well now, I don’t think I’m any closer to explaining what went wrong that produced the very strange result from my original attempts that triggered this post. However, given the discussion herein I opted to go back and start over and it turned out to be quite easy to get the desired result. Keep in mind this is pretty easy to do when I have everything running on my own computers with XAMPP providing the underlying server support. Might to work in other scenarios.

    A basic outline of what worked for me follows:

    1. I restored the original website to its’ normal operating state on a new instance of XAMPP running on another previously uninvolved computer. On the client I have /etc/hosts set to use the IP address of the server for my original domain name.
    2. On the server I then updated the Apache configuration (i.e., file named httpd-vhosts.conf) to specify the new URL as an alias (i.e., ServerAlias) for the original URL. On the client I updated /etc/hosts to also use the same IP address of the server for the new URL.
    3. From the client performed a login using the old/original URL and installed the “Better Search Replace” (BSR) plugin. Ran BSR in trial mode which showed the original URL was only found in the tables named wp_options, wp_users, and wp_posts.
    4. Using BSR changed all of the old URLs to the new one except those in the wp_options table.
    5. Navigated to the Settings>General page and changed the Home & Site URL to the new name. Bingo! The site is now running with the new URL.
    6. Transfer this new instance of the original website which is now running under a different URL to my normal/original test computer which now has 2 instances of my original website running under their own unique URL, which is the result I originally set out to achieve.

    Note: I’m most grateful to bcworkz for the assistance provided in figuring out how to do this. MANY THANKS!

    • This reply was modified 3 years, 4 months ago by aajax.
    Thread Starter aajax

    (@aajax)

    OK, it looks like the article you reference is also referenced by the article I originally referred to but under a heading titled Moving Site which I’m afraid I concluded to be different from what I was wanting to do. Upon further consideration “Moving the Site” and “Changing the URL” are pretty synonymous and I should have paid more attention to that section. The actions I undertook did nothing to update the database to replace occurrences of the old URL with the new one.

    What I’ve now done is update my original website so that I now have the latest version of both WordPress and all the plugins that I use. Then I installed the “Better Search Replace” plugin and performed the so-called “dry run”. In addition to the wp_options it finds one instance in wp_users and a bunch in wp_posts and that’s it other than wp_options.

    The instructions referenced here specify logging in and then manually changing both URLs found in General>Settings which, I think, is where the main values used for the website are maintained. When changed manually the website becomes dysfunctional (e.g., the article says “expect to see a 404 page”). Therefore, I’m thinking I should be able to use “Better Search Replace” to update the tables other than wp_options first and then change wp_options after that either manually as described are possibly with “Better Search Replace”. At that point I’d expect the website to work correctly with the new URL. Note: in my case neither the server nor the database has changed (other than the desired updates to the existing database).

    Now I’ll need to create a new website by restoring the backups (i.e., to a new database & and new instance of the WordPress files) in order to continue to use the original URL for accessing the original. The new database ends up with a new name in order to run on the same server.

    What am I failing to understand? Keep in mind that even if this is a bit of an experiment I haven’t much to loose on my own testing computers.

    • This reply was modified 3 years, 4 months ago by aajax.
    • This reply was modified 3 years, 4 months ago by aajax.
    Thread Starter aajax

    (@aajax)

    Yes bcworkz, I agree with what you say and have done all that you suggest other than trying to also use SSL.

    The problem is that I have a test environment that includes everything needed to run and use WordPress on my own computers for development and testing purposes. Now I want to create a new website that starts off being an exact replica of an exiting website but that needs to be accessed by a different URL. This allows me to experiment with major changes I’m contemplating making on one website and preserve the ability to compare the revisions with the existing website. In that, access both running on the same server being accessed from the same client and browser simultaneously.

    According to referenced documentation it should be pretty easy to change the URL but none of that is working in my case and the result is so bad I loose the ability to even access the website absent the trickery I mentioned. However, I’m NOT at all confident about that situation being a reliable way to test and it certainly does NOT produce something that can then be ported to a hosting service.

    I suppose it is possible that WordPress has at some time in the past been able to allow the URL to be changed but that is NO longer the case. In that, the documentation has NOT kept up with the code. That is what I have to assume at present.

    Thread Starter aajax

    (@aajax)

    After a bit more troubleshooting I now have a bit more to report.

    First I added another of my websites to the new (7.4.33) instance of XAMPP to try a verify that the problem was being caused by WordPress. This other website does NOT use WordPress and works just fine with this new version of XAMPP.

    Second I updated /etc/hosts on the client computer to designate the invalid URL as an alias for the correct URL. Then also updated the Apache configuration to recognize the same invalid URL but refer it to the same instance of WordPress. The website now works as expected. There is NO sign of the invalid URL that shows up anywhere. The WordPress “Setting>General” show the correct URL for both the “WordPress Address URL” and the “Site Addr5ess URL” which are the same.

    While I’m quite uncertain about the implications of using this configuration for my testing, I’m also quite certain that my hosting service does NOT have a way for me to implement such a workaround.

    Thread Starter aajax

    (@aajax)

    Thanks! I think that provides what I need to get started.

    Just in case anybody else cares, I thought it might be worth including some links I found as a result of this discussion. While I have NOT yet produced anything that verifies the accuracy of the referenced material, my initial reading finds them a bit more thorough than others that I found. Consider the following:

    https://www.sitepoint.com/working-with-databases-in-wordpress/ -> Provides more detail about accessing a database than any others that I found.

    https://wpmudev.com/blog/handling-form-submissions/ -> Provides what looks to be a thorough explanation of form submission. This article also includes references to other material of interest as follows:

    https://github.com/karannagupta/nds-admin-form-demo -> A demonstration plugin on which the article is based, which can be installed and run on a test system,

    https://github.com/DevinVinson/WordPress-Plugin-Boilerplate -> A reference to the material on the WordPress site that fits my idea of code that illustrates how it is done which also conforms to recommended coding practices. The demo plugin claims to conform.

    It will take me a while to work through these materials, However, I’d like to thank respondents for their help. Should I find issues with the above I’ll try and remember to update this post.

    Many thanks!

    • This reply was modified 4 years, 3 months ago by aajax.
    • This reply was modified 4 years, 3 months ago by aajax.
    Thread Starter aajax

    (@aajax)

    Yes, based on discussion to date I have been researching how to develop a plugin that would solve my problem. The wpdb class adresses the the database interface part and shortcodes appear to provide the means to dynamically supply content for display on a page. The part I’m still looking for would pertain to how the data included in an HTTP POST request is retrieved. In that, how to obtain the data entered into an HTML form that I think can be requested via the shortcode mechanism. Being able to associate/acknowledge receipt by sending a status reply would also be desired.

    Something that would be a big help would be some kind of sample plugin. While there is no shortage of plugins to install and then try and review, my idea would be a minimal plugin that includes only the necessary files but does something simple that can be associated with the code. Might there be something like that supplied by/for WordPress developers. If not maybe there is a well known plugin that somewhat fits my idea of only including basic necessary features that could be recommended for this purpose.

    • This reply was modified 4 years, 3 months ago by aajax.
    Thread Starter aajax

    (@aajax)

    Thanks, the advice regarding theme verses plugin is quite helpful.

    As I said I have it working without WordPress. In that, I do know how to deal with the database using PHP. To the extent that WordPress might prefer using built-in code I would certainly opt to try and do that.

    You are correct about the part I’m most at a loss for which might could be described as how a page (or post) interacts with the database. This includes queries that both fetch & update data stored in the database. In that, some kind of FORM (? terminology)) that supports fields for data entry are needed as well as replying with results. Something I’ve noticed more recently is the emphasis WordPress is placing on the so-called Block Editor. Question might be can it be used to produce interactive pages? If so how? If NOT how?

    Thread Starter aajax

    (@aajax)

    Yes! It does look like that article pertains to doing what I want to do and suggests it is possible. However, I notice it is more than 10 years old. While it does suggest I’m NOT the only one who ever wanted to do this it does NOT quite rise to the point of being common.

    I can find the wpdb code reference at ww.wp.xz.cn. While that is desirable/helpful I think there is more to it than that. For example ->

      Do I need to develop a plugin?
      How to both read/write data dynamically to/from pages/posts?

    I probably should offer that I’m NOT really a WordPress expert but do have experience setting up and running several sites. Have had some success developing a child theme but I do realize there is an awful lot to it that I’ve yet to learn.

    I was hoping that there might be reference documentation. If NOT maybe just some kind of tutorial that might help one to get started.

    • This reply was modified 4 years, 3 months ago by aajax.
Viewing 15 replies - 1 through 15 (of 57 total)